# Help with formula...

#### veespike

##### New Member
I am using a formula to lookup address information and paste it into a sheet, and need help fixing an error.

This is the formula:

Code:
``=IF(\$H\$20=0,"",VLOOKUP(\$H\$20,'Nashville Lookup Tables.xls'!NashvilleCust,6,TRUE)&", "& VLOOKUP(\$H\$20,'Nashville Lookup Tables.xls'!NashvilleCust,7,TRUE)&"  "& VLOOKUP(\$H\$20,'Nashville Lookup Tables.xls'!NashvilleCust,8,FALSE))``

This formula throws a #VALUE error on the last statement. The referenced column in the table has zip codes in it.

I tried converting it with a TEXT statement, but either I was entering it wrong, or that is the wrong method.

### Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

#### Andrew Poulsom

##### MrExcel MVP
Try changing the FALSE to TRUE, like in the other VLOOKUPs. FALSE expects an exact match.

#### davidhall80

##### Well-known Member
Andrew

I use a 0 instead of TRUE and FALSE. What's the difference between using a 0 or TRUE and FALSE for the lookups?

#### Andrew Poulsom

##### MrExcel MVP
Andrew

I use a 0 instead of TRUE and FALSE. What's the difference between using a 0 or TRUE and FALSE for the lookups?

In Excel FALSE evaluates to 0, and TRUE to 1.

#### veespike

##### New Member
Try changing the FALSE to TRUE, like in the other VLOOKUPs. FALSE expects an exact match.

I tried this, and it did not work. It still reports a #VALUE error.

I actually got it to return a value and not an error with this:
Code:
``=IF(\$H\$20=0,"",VLOOKUP(\$H\$20,'C:\Nashville Lookup Tables.xls'!NashvilleCust,6,true)&", "& VLOOKUP(\$H\$20,'C:\Nashville Lookup Tables.xls'!NashvilleCust,7,true)&"  "& (TEXT(VLOOKUP(\$H\$20,'C:\Nashville Lookup Tables.xls'!NashvilleCust,8,true),"Zip Code")))``

But the formula returns something totally odd this way. The value in place s/b "Saint Charles, MO 63303" What I get back is "Saint Charles, MO Zip Co242073"

I also tried changing the data in the table from numerical to text format, and that did not work. Everything I have read tells me that the problem is trying to concatenate text and numerical data at the same time.

#### Andrew Poulsom

##### MrExcel MVP
There is no problem concatenating text and numbers, eg:

="Saint Charles, MO "&63303

But the format for Zip Code isn't "Zip Code" but "00000". The formula:

=TEXT(63303,"Zip Code")

returns #VALUE!, but:

=TEXT(63303,"00000")

returns 63303.

#### veespike

##### New Member
There is no problem concatenating text and numbers, eg:

="Saint Charles, MO "&63303

But the format for Zip Code isn't "Zip Code" but "00000". The formula:

=TEXT(63303,"Zip Code")

returns #VALUE!, but:

=TEXT(63303,"00000")

returns 63303.

Ah! That works. Thank you.

Replies
1
Views
735
Replies
3
Views
246
Replies
2
Views
417
Replies
0
Views
262
Replies
14
Views
275

1,171,968
Messages
5,878,539
Members
433,350
Latest member
horna

### 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.

### Which adblocker are you using?

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

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