SOLVED
Home

Copy cell value from different table row

%3CLINGO-SUB%20id%3D%22lingo-sub-353604%22%20slang%3D%22en-US%22%3ECopy%20cell%20value%20from%20different%20table%20row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353604%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20everyone.%3C%2FP%3E%3CP%3ETrying%20to%20write%20a%20formula%20that%20will%20check%20a%20table's%20first%20column%20cell's%20value%20and%2C%20if%20it%20meets%20a%20criteria%20to%20do%20one%20thing%20and%2C%20if%20it%20does%20not%20meet%20a%20criteria%2C%20then%20try%20that%20first%20column's%20previous%20cell%20up%20(previous%20row%20above%20current%20one)%2C%20if%20it%20still%20does%20not%20meet%20the%20criteria%2C%20then%20keep%20trying%20the%20previous%20cells%20up%20until%20it%20finds%20a%20cell%20on%20that%20first%20column%20that%20meets%20the%20criteria.%3C%2FP%3E%3CP%3EHopefully%20the%20image%20below%20will%20make%20the%20request%20a%20bit%20more%20clear%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F83625i370A968E437E2AB8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Excel%20Q.png%22%20title%3D%22Excel%20Q.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EClick%20to%20enlarge%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAdditionally%2C%20I%20cannot%20use%20either%20macros%20or%20VBA.%3C%2FP%3E%3CP%3EThanks%20in%20advance%2C%3C%2FP%3E%3CP%3EEdgar%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-353604%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Elookup%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-354108%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20cell%20value%20from%20different%20table%20row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-354108%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20just%20did%20a%20quick%20test%20and%20this%20is%20exactly%20what%20I%20was%20looking%20for!%20LOOKUP%20is%20it!%3C%2FP%3E%3CP%3EThank%20you%20so%20much%2C%3C%2FP%3E%3CP%3EEdgar%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353741%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20cell%20value%20from%20different%20table%20row%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353741%22%20slang%3D%22en-US%22%3EHello%20Edgar%2C%3CBR%20%2F%3EAssuming%20your%20Column%20labels%20are%20in%20A1%3AI1%20and%20your%20data%20starts%20at%20A2%2C%20your%20formula%20in%20I2%2C%20copied%20down%20to%20rows%20thereunder%2C%20is%3A%3CBR%20%2F%3E%3DIF(OR(A2%3D%7B%22FLUORESCENT%22%2C%22LED%22%7D)%2C%3CBR%20%2F%3ELOOKUP(2%2C1%2F((A%242%3AA2%26lt%3B%26gt%3B%22FLUORESCENT%22)*(A%242%3AA2%26lt%3B%26gt%3B%22LED%22))%2CA%242%3AA2)%2C%3CBR%20%2F%3ECHAR(150))%3CBR%20%2F%3EIf%20you%20prefer%20an%20em%20dash%20over%20en%20dash%2C%20you%20can%20modify%20CHAR(150)%20to%20CHAR(151).%3CBR%20%2F%3ECheers!%3CBR%20%2F%3ETwifoo%3C%2FLINGO-BODY%3E
Edgar Soares
New Contributor

Hi, everyone.

Trying to write a formula that will check a table's first column cell's value and, if it meets a criteria to do one thing and, if it does not meet a criteria, then try that first column's previous cell up (previous row above current one), if it still does not meet the criteria, then keep trying the previous cells up until it finds a cell on that first column that meets the criteria.

Hopefully the image below will make the request a bit more clear:

Excel Q.pngClick to enlarge

 

Additionally, I cannot use either macros or VBA.

Thanks in advance,

Edgar

2 Replies
Solution
Hello Edgar,
Assuming your Column labels are in A1:I1 and your data starts at A2, your formula in I2, copied down to rows thereunder, is:
=IF(OR(A2={"FLUORESCENT","LED"}),
LOOKUP(2,1/((A$2:A2<>"FLUORESCENT")*(A$2:A2<>"LED")),A$2:A2),
CHAR(150))
If you prefer an em dash over en dash, you can modify CHAR(150) to CHAR(151).
Cheers!
Twifoo

Hi, @Twifoo 

I just did a quick test and this is exactly what I was looking for! LOOKUP is it!

Thank you so much,

Edgar

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies