Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a more elegant way to macro this?
Sub changekey()
If Range("b1").Value = "Joint" Then Range("key1").Value = "J" & Mid(Range("key1").Value, 2, 255) End If End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a more elegant way to macro this?
Maybe not more elegant, but it would be more robust if you qualify all
appropriate Range's with a sheet reference. Tim "Brad" wrote in message ... Sub changekey() If Range("b1").Value = "Joint" Then Range("key1").Value = "J" & Mid(Range("key1").Value, 2, 255) End If End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a more elegant way to macro this?
Brad,
You can work with the .Characters instead: Range("key1").Characters(1, 1).Text = "J" NickHK "Brad" wrote in message ... Sub changekey() If Range("b1").Value = "Joint" Then Range("key1").Value = "J" & Mid(Range("key1").Value, 2, 255) End If End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a more elegant way to macro this?
Thank you
"NickHK" wrote: Brad, You can work with the .Characters instead: Range("key1").Characters(1, 1).Text = "J" NickHK "Brad" wrote in message ... Sub changekey() If Range("b1").Value = "Joint" Then Range("key1").Value = "J" & Mid(Range("key1").Value, 2, 255) End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Elegant Formulas | Excel Worksheet Functions | |||
Is there an elegant way? | Excel Discussion (Misc queries) | |||
Is there an elegant solution to this table? | Excel Discussion (Misc queries) | |||
More elegant way to do IF () | Excel Worksheet Functions | |||
More elegant method? | Excel Worksheet Functions |