External data table is imported as text and cant be changed to number

Bondator

New Member
Joined
Oct 10, 2017
Messages
2
I am trying to create a pivot table from an external data file. The data file is an .xls file with whole bunch of numerical laboratory results in it. The thing is, not every product is tested for everything, so it's natural that some fields are left blank.

I've figured out that the problem happens when the first row of the data happens to be blank, then the entire column is imported as text, not as number. And of course text values don't work at all in a pivot table. Trying to change the column number format in the imported table doesn't seem to do anything either.

Any ideas on how to force a number format on the imported data table?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Something to work with;

If a number that is text is multiplied by something it turns it back into a number to work with.

If you could always download it into another tab and then set another tab to multiply whatever gets downloaded.

Perhaps you can build it from there...

Just a thought...
 
Upvote 0
Thanks for the thought. Creating a new column and using formula below seemed to work.

=IF(NOT(ISBLANK(source);VALUE(source);"")

Weirdly though, as I'm doing this exactly the same thing today with fresh data, the values are imported just fine as numbers, even with the first cell empty. Now I have no idea what Excel's logic is with this thing.
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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
Back
Top