View Single Post
Old 04-02-2008, 02:43 PM   #2 (permalink)
Glaswegian
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
 
Glaswegian's Avatar
 
Join Date: Sep 2005
Location: Glasgow
Posts: 26,785
OS: Win XP Pro SP3 / Win 7 Pro

My System

Re: help using formulas and trickery PLEASE

Hi and welcome to TSF.

Some of what you want can be achieved with formulae and formatting - some might need some VBA code (depends if I can remember my formulae...)

To remove spaces in text, use something like

=SUBSTITUTE(B4," ","")

or select your cells, go to Edit > Replace, Find what: Type a space character > Replace All.

To show a leading zero, you need to format the cells, using a custom format - use 0 (zero) as the placeholder. For example, you want 123 to show as 0123. Format the cell using a custom format of '0000'.

For something like 'Nottingham NG1 1GN', you could split it using a LEFT or MID function, perhaps using the space in the text as your 'marker'. This would require a more complex formula or custom function and I would be tempted to use VBA.

Hopefully that should at least get you started.
__________________
Iain - Defender of the Haggis and all things Scottish.
I don't help by PM - post in the Forums.



PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner
Glaswegian is offline   Reply With Quote