Reading from another file

RodneyW

Active Member
Joined
Sep 24, 2010
Messages
332
I have this formula in column O as well as P

IFERROR(VLOOKUP($B5,'[SampleData2020.xlsx]2020'!$B$3:$B$200,1,FALSE),"")

I believe what it is doing is looking at the value in column B on the sheet where the formula is, and looking for the same value in column B, rows 3 through 200 on the SampleData file. Here’s where I run into a problem. Column O on my destination sheet should display the value in column F on the SampleData file. Column P should display the value in Column E. My thoughts were that by changing the ,1, part of the formula, I’d change the column data was pulling from. If I change it to 2, 3 or even 0 or -1 or anything else, the resulting value is blank. Currently, using the formula above, it displays the value in column B from Sample Data.

What am I missing? Thank you in advance.
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
50,890
Office Version
  1. 365
Platform
  1. Windows
How about
IFERROR(VLOOKUP($B5,'[SampleData2020.xlsx]2020'!$B$3:$F$200,5,FALSE),"")

and change the 5 to 4 for column P
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
50,890
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,794
Messages
5,574,338
Members
412,587
Latest member
Krucial155
Top