Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LB LB is offline
external usenet poster
 
Posts: 5
Default formula for Canadian Postal Codes

Hi there. Can someone help me out with a formula to go from this:
b3k2m6

too this:
B3K 2M6

capitals included?

I have them all in one column, G.
Thannks.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default formula for Canadian Postal Codes

=UPPER(LEFT(A1,3)&" "&RIGHT(A1,3))

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"LB" wrote in message
...
Hi there. Can someone help me out with a formula to go from this:
b3k2m6

too this:
B3K 2M6

capitals included?

I have them all in one column, G.
Thannks.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 142
Default formula for Canadian Postal Codes

=IF(A4<"",UPPER(LEFT(A4,3)&" "&RIGHT(A4,4)),"")
this one worked for me

"LB" wrote:

Hi there. Can someone help me out with a formula to go from this:
b3k2m6

too this:
B3K 2M6

capitals included?

I have them all in one column, G.
Thannks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LB LB is offline
external usenet poster
 
Posts: 5
Default formula for Canadian Postal Codes

Thanks for the info. I'm not sure how to format the entire column so that
when I type b2j3e6 in one row, then m4y1k9 in another, they change.

lb
"ufo_pilot" wrote in message
...
=IF(A4<"",UPPER(LEFT(A4,3)&" "&RIGHT(A4,4)),"")
this one worked for me

"LB" wrote:

Hi there. Can someone help me out with a formula to go from this:
b3k2m6

too this:
B3K 2M6

capitals included?

I have them all in one column, G.
Thannks.





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default formula for Canadian Postal Codes

In an adjacent column............say H

=UPPER(LEFT(G1,3)&" "&RIGHT(G1,3))

Double-click on the fill handle of H1 to fill down.


Gord Dibben MS Excel MVP


On Thu, 25 Jan 2007 12:22:30 -0400, "LB" wrote:

Hi there. Can someone help me out with a formula to go from this:
b3k2m6

too this:
B3K 2M6

capitals included?

I have them all in one column, G.
Thannks.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default formula for Canadian Postal Codes

Take the formula you were given & copy it as far as you like down the
column. Note that this won't change what is in your original column, but
will give the output in a separate column where you've put your formula.
After that, if you wish to you can replace the original column by doing a
copy & paste special/ values.
--
David Biddulph

"LB" wrote in message
...
Thanks for the info. I'm not sure how to format the entire column so that
when I type b2j3e6 in one row, then m4y1k9 in another, they change.


"ufo_pilot" wrote in message
...
=IF(A4<"",UPPER(LEFT(A4,3)&" "&RIGHT(A4,4)),"")
this one worked for me

"LB" wrote:

Hi there. Can someone help me out with a formula to go from this:
b3k2m6

too this:
B3K 2M6

capitals included?

I have them all in one column, G.
Thannks.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default formula for Canadian Postal Codes

For new entries you could use event code to change them as you entered them.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column < 7 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
With Target
.Formula = UCase(Target.Formula)
.Value = (Left(Target.Value, 3) & " " & Right(Target.Value, 3))
End With
ErrHandler:
Application.EnableEvents = True
End Sub

This is event code. Select the sheet tab and "View Code".

Copy/paste the above into that module.

As written operates only on column G........Target.Column < 7

Existing entries in Column G can be changed by selecting each cell and F2 then
ENTER


Gord Dibben MS Excel MVP

On Thu, 25 Jan 2007 13:23:51 -0400, "LB" wrote:

Thanks for the info. I'm not sure how to format the entire column so that
when I type b2j3e6 in one row, then m4y1k9 in another, they change.

lb
"ufo_pilot" wrote in message
...
=IF(A4<"",UPPER(LEFT(A4,3)&" "&RIGHT(A4,4)),"")
this one worked for me

"LB" wrote:

Hi there. Can someone help me out with a formula to go from this:
b3k2m6

too this:
B3K 2M6

capitals included?

I have them all in one column, G.
Thannks.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell format for Canadian postal codes mmcstech Excel Discussion (Misc queries) 10 April 21st 23 09:01 PM
Find value in array Brook6 Excel Worksheet Functions 26 January 30th 07 09:40 PM
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Postal formula omutumo Excel Discussion (Misc queries) 2 May 22nd 06 11:12 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM


All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"