• 410K Members
• 9,621 Online
• 466K Conversations
SOLVED

New Contributor

# Copy cell value from different table row

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:

Click to enlarge

Additionally, I cannot use either macros or VBA.

Edgar

2 Replies
Solution

# Re: Copy cell value from different table row

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

# Re: Copy cell value from different table row

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