Forum menu
Excel spreadsheet h...
 

[Closed] Excel spreadsheet help

 hora
Free Member
Joined: 17 years ago
Posts: 0
Topic starter   [#7208616]

Trying to insert a zero into a spreadsheet: 0851274 for instance but when the sheet saves it removed the zero. This needs to be in. I've tried entering '0851274 and it removes the zero still. Same with format cells etc.

Help!



   
Full Member
Joined: 14 years ago
Posts: 395
 

Try doing ="0851274"



   
Free Member
Joined: 16 years ago
Posts: 5346
 

Format cells as text prior to entering data



   
 hora
Free Member
Joined: 17 years ago
Posts: 0
Topic starter  

Need to save as a CSV file though (for inland revenue) which doesn't work still. Darn ๐Ÿ™



   
Full Member
Joined: 17 years ago
Posts: 25941
 

what's going to happen to the numbers afterwards ? - if they're only going to be read by a human, maybe 0.851274 or starting with letter O rather than zero would be OK ?

(granted, would be a pain if there are loads of numbers)



   
Free Member
Joined: 16 years ago
Posts: 0
 

'0851274
edit - gah, that doesn't work either



   
Full Member
Joined: 16 years ago
Posts: 8890
 

The zero is saved fine with the method you are using but excel removes it when you open the .csv file with excel. Try opening the saved .csv file in notepad.



   
Free Member
Joined: 16 years ago
Posts: 0
 

there are various ways to retain the zero, as above. But it is stripped once one opens the file again in excel - one might assume that IR people will be opening the file in excel (and stripping the zero). True, they might not be using excel but we can't be sure



   
Full Member
Joined: 16 years ago
Posts: 8890
 

If they want the file in .csv format with leading zeros you can't do more than give them what they asked for. I doubt they are using excel to read the files but even if they are I'm sure they are aware of the problem and import the data into the spreadsheet as text (retaining the leading zeros) rather than double clicking on it.



   
Full Member
Joined: 17 years ago
Posts: 12088
 

Assuming the "851274" bit of "0851274" is unique, just open the CSV in notepad (or notepad++) and do search and replace before sending.



   
Full Member
Joined: 16 years ago
Posts: 8890
 

No, it's really simple

I've tried entering '0851274

works fine. The leading zeros are in the .csv file and if you open it in notepad you will see they are there.