# VLookup Problem with Fomulated Lookup Value

#### Eb0la11

##### New Member
I have this as my VLookup formula:

=VLOOKUP(\$B24,'Reference Tables'!\$A\$2:\$B\$100,2,FALSE)

B24 ends up pulling the formula result of "4" as this cell is a formula itself which is this:

=IFS(LEN('Q-Tools Data'!\$A2)=12,LEFT('Q-Tools Data'!\$A2,1),LEN('Q-Tools Data'!\$A2)=13,LEFT('Q-Tools Data'!\$A2,2),LEN('Q-Tools Data'!\$A2)=14,LEFT('Q-Tools Data'!\$A2,3))

its like it can't see that B24 is just 4. Instead it gives me an error, but if I type in 4 into the cell and replace that formula it works fine.

Can I not use Vlookup to look at a formulated cell or do I have to add an additional piece of information or formatting?

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### Fluff

##### MrExcel MVP, Moderator
The LEFT function returns a text value, try
=--IFS(LEN('Q-Tools Data'!\$A2)=12,LEFT('Q-Tools Data'!\$A2,1),LEN('Q-Tools Data'!\$A2)=13,LEFT('Q-Tools Data'!\$A2,2),LEN('Q-Tools Data'!\$A2)=14,LEFT('Q-Tools Data'!\$A2,3))

which should convert it into a number

#### Eb0la11

##### New Member
Ha! Same solution as my last question. Thanks again good sir.

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback

Replies
9
Views
151
Replies
8
Views
611
Replies
2
Views
59
Replies
5
Views
50
Replies
0
Views
45

1,109,433
Messages
5,528,738
Members
409,831
Latest member
KT50

### This Week's Hot Topics

• Change military grades into rank
Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
• VBA COUNTIF SOLUTION
Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
• INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
• VBA vlookup multiple results
Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
• Extract values for earliest/latest times
I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...