简体   繁体   中英

Excel, Formula to check availability. Check and copy values to cover each position

I have the following table: 在此处输入图片说明

The formula I am looking for should do this: Starting from Prod. 2 in the second table (I4): It should check if the cell A4 is blank, then look for a value in B4 if B4 has a value copy it to I4. If A4 is not blank, no need to look for value and no need to copy it, just leave I4 blank.

In J4 it should check if cells A4:B4 are blank before looking for value C4. ... The last one M4 should check cells A4:E4 before checking values in F4 to copy it (if there is) into M4.

The table should represent maximal availibilty. The objective is to check if there is already an value in the column before, if yes no need to act, if blank, yes look up and copy value from next column. This goes on until last column M4. The values within in the cells are not of importance. It should simply check if like this: if there is nothing in cells A4:E4 then look up F4 and if in F4 there is a value then copy it to M4 if F4 is also blank, then M4 keeps blank. Like this for every column. L4 would be like this--> check if A4:D4 have a value if every cell is blank then look up E4 and if E4 has value then copy it to L4 if not, leave L4 blank.....

I hope this gets some rep..

Column h : Prod 1

=IF(A4="";"";A4)

Column i : Prod 2

=IF(H4="";IF(B4="";"";B4);"")

Column j : Prod 3

=IF(AND(H4="";I4="");IF(C4="";"";C4);"")

Column k : Prod 4

=IF(AND(H4="";I4="";J4="");IF(D4="";"";D4);"")

Column l : Prod 4

=IF(AND(H4="";I4="";J4="";K4="");IF(E4="";"";E4);"")

Column m : Prod 6

=IF(AND(H4="";I4="";J4="";K4="";L4="");IF(F4="";"";F4);"")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM