Good Morning,
I am looking for a way to ensure that all the leading zeros in one column are present without having to format the column cell be cell. Is this possible?
Cheers
Claire
Good Morning,
I am looking for a way to ensure that all the leading zeros in one column are present without having to format the column cell be cell. Is this possible?
Cheers
Claire
Hi,
Select the column you want to format with leading zeros, by clicking the column header.
Go to Format > Cells > Number Tab > Text
Rule 1: Never merge cells
Rule 2: See rule 1
"Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".
Hi,
Tried that, the problem is that the cells have already been populated but they don't seem to have been formatted, so by the time it reaches me I'm not sure if certain cells are supposed to have 1 or 2 leading zeros. Does that make sense? Looking for a solution to this as we are receiving worksheets with thousands of assets each month.
Thanks
Claire
So when you get this data it doesn't have the leading zeros?
No, but it should have, it's being populated by different people and then passed to us, so I don't know if they're sheets have been formatted
If its the same workbook being populated every time, you could put this code in the workbook,
so it runs every time the workbook is opened, and formats the column to text. Then when it's populated it will always be formatted correctly.Please Login or Register to view this content.
Cheers Dave , I'll try that.
Claire
Dave,
Sorry being a bit dim, how do I enter the code that you've suggested?
Claire
See link
http://www.contextures.com/xlvba01.html#Workbook
VBA Noob
_________________________________________
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
okay tried that, once you've pasted the code do you hit run or save, not very good at this type of thing and all the advice given is very welcome.
Once you've pasted the code, close the VBA editor, then save the worksheet and close it. The next time you open the sheet the code will run.
Dave
Yeah, it worked!
Cheers everyone
Your welcome!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks