Can the "Lookup" formula be used to find separate values instead of a range?

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
790
Office Version
  1. 365
Platform
  1. Windows
I found this formula which returns the rightmost non-blank cell in a range:

=LOOKUP(2,1/(P7:S7<>""),P7:S7)

Can I instead specify, like... M7, O7, Q7, S7?


Cheers.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Not sure what your layout is but maybe use an override cell i.e.
Code:
A1: =LOOKUP(2,1/(P7:S7<>""),P7:S7)
B1: =M7
C1: =IF(LEN(B1)>0,B1,A1)
Delete B1 if you want C1 to show A1, else enter specific into B1
 
Last edited:
Upvote 0
Hi Jack, thanks for the reply.

The lookup range is H:S, however the only cells I want to get the right-most value for are H, K, N and Q - Every cell with 2 cells in between.
 
Upvote 0
Because you have a pattern you could use this:

=LOOKUP(2,1/((M7:S7<>"")*(ISODD(COLUMN(M7:S7)))),M7:S7)
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

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