How to look up and return first non zero value?

zyzz

New Member
Joined
Sep 13, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have the following data:
IDOutput
1
1TextString A
1
2
2TextString B
2

The cells in the output columns are formulae that either return "" or a text string.

I want to look up the ID and return the non-zero/non-"" value in the output column, e.g. lookup ID = 1 and return A.

Have been fiddling around with INDEX MATCH and adding a helper column but can't seem to get anything to work. Any help is much appreciated.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDE
1IDOutput
211TextString A
31TextString A2TextString B
41
52
62TextString B
72
8
Data
Cell Formulas
RangeFormula
E2:E3E2=LOOKUP(2,1/(($B$2:$B$10<>"")*($A$2:$A$10=D2)),$B$2:$B$10)
 
Upvote 0

Forum statistics

Threads
1,213,496
Messages
6,113,995
Members
448,539
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top