Excel Formula: Lookup if with multiple criteria (lookup_vector)

jorey004

New Member
Joined
Apr 30, 2021
Messages
5
Office Version
  1. 2010
Platform
  1. Windows
Last Date Qty>01-Jan2-Jan3-JanStocks4-Jan5-Jan6-Jan7-Jan8-Jan9-Jan10-JanStocks
FriSatSunMonTueWedThuFriSatSun
Apple3-Jan101520120-------400
Orange5-Jan---50-3-----20
Strawberry1-Jan30--80-------30

1619773136507.png


Hi,

I would like to get the date from row 1:1,
When the data from row 3:3 is greater than 0. ("-" is zero uses accounting format)
B3 =LOOKUP(2,1/(C3:N3<>0),C1:N1) but this will include the "Stocks".
So must have multiple criteria C1:N1<>"Stocks"

B3, B4, B5 is the value I want to get using formula.

I have tried to use AND but lookup_vector doesn't support it.

Thanks
 

Attachments

  • 1619773127333.png
    1619773127333.png
    21.6 KB · Views: 3

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Try this in B3:
Excel Formula:
=LOOKUP(2,1/(C3:N3<>0)/($C$1:$N$1<>"Stocks"),$C$1:$N$1)
 
Upvote 0
Solution
Try this in B3:
Excel Formula:
=LOOKUP(2,1/(C3:N3<>0)/($C$1:$N$1<>"Stocks"),$C$1:$N$1)
Hi Habtest,

I've tested it on an excel spreadsheet. It works pretty well.
However, it doesn't work on google spreadsheet. It returns #N/A

Error: Did not find value '2' in lookup evaluation.

Is there another way, that also works on google spreadsheets?
Sorry if quite unrelated to excel concerns.
 
Upvote 0
1619779440934.png
1619779440993.png


Here's the error btw.
Post is related to EXCEL concerns, should I create another thread for google spreadsheet?
 
Upvote 0
You might have to set it as an array formula (I think that the excel method of Ctrl Shift Enter works).

Rather than starting another thread, I would suggest clicking the 'Report' link at the bottom left corner of post 1 and asking a moderator to move this thread.
 
Upvote 0
Just a summary to those who have the same concerns

Excel Formula this works pretty well:
=LOOKUP(2,1/(C3:N3<>0)/($C$1:$N$1<>"Stocks"),$C$1:$N$1)

Google spreadsheet need arrayformula (CTRL+SHIFT+ENTER) to work:
=ArrayFormula(LOOKUP(2,1/(C3:N3<>0)/($C$1:$N$1<>"Stocks"),$C$1:$N$1))

Thank you so much

Habtest and jasonb75

 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,490
Members
448,967
Latest member
visheshkotha

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