zip code problem

nnadimi19

Board Regular
Joined
Jul 14, 2002
Messages
240
I have a sheet with a column that has zip codes. some of the zip codes are 5 digits and some have the addition 4 digit at the end. I am trying to populate a SQL DB with this information.

The problem is that the zip codes with only 5 digits (e.g. 78729) get populated ok but the zip codes with the additional 4 digits (e.g. 78729-1234) does not get populated.

I beleive that the "-" is causing the problem because I am having the same issue populating Social Security Numbers.

Is this an EXCEL problem if yes would someone help me out.

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Barrie Davidson

MrExcel MVP
Joined
Feb 10, 2002
Messages
2,330
What field type are you putting the information in? It should be text and not numeric.

Regards,
 

nnadimi19

Board Regular
Joined
Jul 14, 2002
Messages
240
Thanks for the quick response. But unfortunately the format I am using is the text format and I am still having that problem.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,943
Office Version
  1. 365
Platform
  1. Windows
Do you also need to dimension the SQL variables as text also?
 

Watch MrExcel Video

Forum statistics

Threads
1,129,745
Messages
5,638,114
Members
417,009
Latest member
Emily00028

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
Top