VLookup with IF formula reference another worksheet

drop05

Active Member
Joined
Mar 23, 2021
Messages
285
Office Version
  1. 365
Platform
  1. Windows
Hello, I am having trouble trying to come up with logic to make this happen. So i have an idea of using a vlookup
where im thinking of the vlookup looking partially like this but all in one
=VLOOKUP(D7,'List'!$G:$Z,19,FALSE)
=VLOOKUP(D7,'List'!$G:$Z,20,FALSE)

the IF part id like to add is that
with this vlookup with the column index being 19, if that cell value is "X" then the value in which this formula would be located would be "Unrelated"
but if the value of vlookup with the column index 20 if that value is "X" then the value in which this formula would be located would be "Related"
if both of the column index 19 & 20 if they are both "X" then the value in which this formula would be located would be "Both above"

if there is no X in either and they are "" then the value in which this formula would be located would be "Blank"


hopefully i made sense, but maybe you can see why im also lost
any help would be appreciated!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
How about
Excel Formula:
=LET(v,VLOOKUP(D7,List!G:Z,{19,20},0),t,TEXTJOIN(" ",0,v),IF(LEN(t)=3,"Both above",IF(LEN(t)=1,"",IF(LEFT(t)="X","Unrelated","Related"))))
 
Upvote 0
How about
Excel Formula:
=LET(v,VLOOKUP(D7,List!G:Z,{19,20},0),t,TEXTJOIN(" ",0,v),IF(LEN(t)=3,"Both above",IF(LEN(t)=1,"",IF(LEFT(t)="X","Unrelated","Related"))))
This is awesome! Curious, if both 19 and 20 are Blank like no value in either, is there a way to get the text "Blank" to come out from the formula?
 
Upvote 0
How about
Excel Formula:
=LET(v,VLOOKUP(D7,List!G:Z,{19,20},0),t,TEXTJOIN(" ",0,v),IF(LEN(t)=3,"Both above",IF(LEN(t)=1,"",IF(LEFT(t)="X","Unrelated","Related"))))
Wait you can cancel that i see the logic there just put Blank where it is len(t)=1,""
 
Upvote 0
Glad you sorted it & thnaks for the feedback.
 
Upvote 0
How about
Excel Formula:
=LET(v,VLOOKUP(D7,List!G:Z,{19,20},0),t,TEXTJOIN(" ",0,v),IF(LEN(t)=3,"Both above",IF(LEN(t)=1,"",IF(LEFT(t)="X","Unrelated","Related"))))
Thank you so much! I need to look into what the text join and Left, i have not used that much
 
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

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