Forum Discussion
Multiple IF statements, I think
- Dec 06, 2021
MattP817 I think i can do 1 better. If you unmerge the cells (at least in column G) then this formula can be pasted on the entire column (paste formula only to maintain other formatting):
=IFS(A6="Time","Units/Hr.",B6="PO#","Unit Rate",A6="","",NOT((A6<=2)*(A6>=0)),"",(E5>" ")*(E6=""),LET(a,XLOOKUP(C6,$C$1:$C5,$F$1:F5,0,0,-1),IF(F6<a,F6,F6-a)),F6<F5,F6,TRUE,(F6-F5))
In the attached I unmerged cells in rows 31-34 and tested it there and seems to work well. Basically instead of copy and paste each section you will be able to copy and paste on the entire column (paste formula only).
mtarler Thanks for the update! I have a couple more issues. I have the formula loaded (XLOOKUP). I have a few errors I am trying to work out. I owe you big time for all of your help!
- On G1072 it is looking for the previous time we ran that material and it is pulling the data from cell F270 giving me a negative.
- Same thing on G1036, pulling from F891.
- On cell G714, we switched POs, but ran the same material. How would I be able to fix an error like this
MattP817 I think i can do 1 better. If you unmerge the cells (at least in column G) then this formula can be pasted on the entire column (paste formula only to maintain other formatting):
=IFS(A6="Time","Units/Hr.",B6="PO#","Unit Rate",A6="","",NOT((A6<=2)*(A6>=0)),"",(E5>" ")*(E6=""),LET(a,XLOOKUP(C6,$C$1:$C5,$F$1:F5,0,0,-1),IF(F6<a,F6,F6-a)),F6<F5,F6,TRUE,(F6-F5))
In the attached I unmerged cells in rows 31-34 and tested it there and seems to work well. Basically instead of copy and paste each section you will be able to copy and paste on the entire column (paste formula only).
- MattP817Dec 06, 2021Copper ContributorYOU ARE A GENTLEMAN AND A SCHOLAR!