Jyggalag

Active Member
Joined
Mar 8, 2021
Messages
422
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Dear all,

I am relatively new to Excel and have little experience with functions, especially across different excel files.

I currently have two excel-files, where one looks like this (file 1):

Excel file 1 snip.PNG


And the other one looks like this (file 2):

excel file 2 snip.PNG


Currently, what I would like is for file 1 to return the value "YES" to every cell in column K. However, I ONLY want it to do this, if the client in column D in the corresponding cell number in file 1 is also present as a client in column D in file 2.

Is there some nice way to do this for example through a vlookup? And how would I go about it?

Any assistant would be greatly appreciated! Thank you so very much everybody! :)

Kind regards,
Jyggalag
 
You need to include the single quotes like
Excel Formula:
=IF(ISNA(VLOOKUP(D2,'[Book2.xlsx]Sheet1'!$D$2:$D$40,1,0)),"No","Yes")
You also need to change Book2.xlsx & Sheet1 to the name of your workbook & sheet
You need to change all of the commas to semicolons, you've only done the last 2 :oops:

Excel Formula:
=IF(ISNUMBER(MATCH(D2;[Book2]Sheet1!$D$2:$D$11;0));"YES";"NO")
Phuoc's formula is missing an apostrophe
Excel Formula:
=IF(ISNA(VLOOKUP(D2'[Book2.xlsx]Sheet1'!$D$2:$D$40'1'0))'"No"'"Yes")

Other than that both should work fine.

edit:- one point to note, I haven't used the file extension (.xlsx) with my suggestion. In the event that you have 2 workbooks open with the same name and different file extensions then you could encounter problems there (never actually tried it).

Also, if 'Book2' is not open then you would need to include the entire file path in the formula (gets messy), so it is better to do it with the file open, excel will then add the rest of the path for you' Just remember that if you move or rename the file then the formula will break (this applies to any formula that refers to a different workbook, not just mine).
Sorry for the delayed response, but if I may ask one final question!

In the formula: =IF(ISNA(VLOOKUP(D2;[book2.xlsx]Sheet1!$D$2:$D$11;1;0));"No";"Yes")

Rather than have it say "YES" if the client name is there, is there a way in which I can make it write the name written in cell D2 (and other corresponding cells) instead?

I tried writing =IF(ISNA(VLOOKUP(D2;[book2.xlsx]Sheet1!$D$2:$D$11;1;0));"No";"D2"), but it does not work unfortunately :(
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Sorry for the delayed response, but if I may ask one final question!

In the formula: =IF(ISNA(VLOOKUP(D2;[book2.xlsx]Sheet1!$D$2:$D$11;1;0));"No";"Yes")

Rather than have it say "YES" if the client name is there, is there a way in which I can make it write the name written in cell D2 (and other corresponding cells) instead?

I tried writing =IF(ISNA(VLOOKUP(D2;[book2.xlsx]Sheet1!$D$2:$D$11;1;0));"No";"D2"), but it does not work unfortunately :(
Nevermind, I figured it out, just had to remove the gooseeyes :D
 
Upvote 0
But you only joined 2 hours ago :confused:
I used this website a long time ago on an old account and I remember Fluff responding to me there haha.

Still a novice at Excel though, returning to working in it after a long hiatus, and very limited experience in coding and functions/formulas :)
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,612
Members
449,238
Latest member
wcbyers

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