Possible IF THEN statement?

C_merr

New Member
Joined
May 26, 2016
Messages
19
What is the best formula to use if I want to (in sheet 1) search for the cell that contains the text "WHEAT-SRW" but not an exact match, and return the value in column H that is in the same row as "WHEAT-SRW"
 

Excel 2010
ABCDEF
2q2
3w6
4e9
5543fv gg WHEAT-SRW11
6
7WHEAT-SRW11
Sheet4
Cell Formulas
RangeFormula
F7=VLOOKUP("*"&E7&"*",$A$2:$B$5,2,0)


If the search term appears just once (adjust the range and column number for H)
 
Upvote 0
Instead of referencing WHEAT-SRW from a different cell can I replace E7 with WHEAT-SRW? because the only place that it is found on a the sheets is in the first sheet in column A wherever it appears (For example, in this case it would only occur at A5. The data in Sheet 1 changes each week, and has many columns of different values, i then pull some of those values and put them in a new row each week on sheet two. The reason this will be helpful and I can't link a cell is because each week i have found that the commodities may switch orders in sheet one.
 
Upvote 0
E7 already contains WHEAT-SRW, do you mean put the adjacent value (11) in that cell instead of having them separate?
 
Upvote 0
You can put that E7 value anywhere by the way, you're not linking a fixed cell. The lookup is flexible.
 
Upvote 0
VLOOKUP("*"&E7&"*",$A$2:$B$5,2,0)

Do you mean

VLOOKUP("*"&"WHEAT-SRW"&"*",$A$2:$H$5,2,0)

OR VLOOKUP("*"&AA1&"*",$A$2:$H$5,2,0) or VLOOKUP("*"&Z1&"*",$A$2:$H$5,2,0)


Either way will work

But be aware

if the value is "WHEAT SRW" or "WHEA-SWR" etc.. the "*" 's won't help
 
Last edited:
Upvote 0
instead of referencing wheat-srw from a different cell can i replace e7 with wheat-srw? Because the only place that it is found on a the sheets is in the first sheet in column a wherever it appears (for example, in this case it would only occur at a5. The data in sheet 1 changes each week, and has many columns of different values, i then pull some of those values and put them in a new row each week on sheet two. The reason this will be helpful and i can't link a cell is because each week i have found that the commodities may switch orders in sheet one.




=vlookup("*"&"wheat-srw"&"*",$a$2:$b$5,2,0)
 
Upvote 0

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