Find text in row and return the next cell contents

dmarchand1

New Member
Joined
Jan 11, 2022
Messages
8
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hi - Is there a way to look across a row of data, find a specific text value, then return the text in the cell to its right? In the example below, I want to search each row across columns BD:BO, if I find the text "Vice President" in any cell within that row, I want to bring back the text in the next cell to the right, in this case the name of the Vice President. I haven't found a way to use Hlookup to do this. Any thoughts?

Thanks!

1641931475402.png
 

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.
Hi & welcome to MrExcel.
How about
Excel Formula:
=LOOKUP(2,1/(BD2:BN2="Vice President"),BE2:BO2)
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=LOOKUP(2,1/(BD2:BN2="Vice President"),BE2:BO2)
Thank you very much for the suggestion. I am getting #N/A. what is the number 2 represent in the parenthesis?
 
Upvote 0
You can hide the #N/A for rows with no VP like
Excel Formula:
=IFNA(LOOKUP(2,1/(BD2:BN2="Vice President"),BE2:BO2),"")
 
Upvote 0
You can hide the #N/A for rows with no VP like
Excel Formula:
=IFNA(LOOKUP(2,1/(BD2:BN2="Vice President"),BE2:BO2),"")
I was using the formula incorrectly. I needed to extend the range, then it worked perfectly. Thank you very much! If you have time, would you explain how the formula is functioning? for example, why is there 1/1/(BD2:BN2="Vice President")_?
 
Upvote 0
The (BD2:BN2="Vice President")returns an array of true or false & then when 1 is divided by that array you get an array of 1s and #Div0s, it then looks for 2 in that array as an exact match or the next smallest number
 
Upvote 0
The (BD2:BN2="Vice President")returns an array of true or false & then when 1 is divided by that array you get an array of 1s and #Div0s, it then looks for 2 in that array as an exact match or the next smallest number
Thank you very much!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,589
Messages
6,120,415
Members
448,960
Latest member
AKSMITH

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