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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
50,991
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,991
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,968
Messages
5,575,277
Members
412,653
Latest member
JyothiGrace
Top