Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
a macro for inserting
I need a solution/macro to insert a minussign (-) into a 10 digit number
between digit 6 and 7 (to get a number looking like this xxxxxx-xxxx) I need to do it in a single column for all 65 536 lines of code in the spreadsheet. who of you is nerd enough to tackle this challenge? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
a macro for inserting
Hi spreadsheet monkey
You can try this Dim cell As Range For Each cell In Columns("A").SpecialCells(xlCellTypeConstants) cell.Value = Mid(cell.Value, 1, 6) & "-" & Mid(cell.Value, 7, 4) Next cell With a formula you can do this in col B =MID(A1,1,6)&"-"&MID(A1,7,4) -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "spreadsheet monkey" <spreadsheet wrote in message ... I need a solution/macro to insert a minussign (-) into a 10 digit number between digit 6 and 7 (to get a number looking like this xxxxxx-xxxx) I need to do it in a single column for all 65 536 lines of code in the spreadsheet. who of you is nerd enough to tackle this challenge? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
a macro for inserting | Excel Programming | |||
macro for inserting a row | Excel Programming | |||
inserting row macro | Excel Discussion (Misc queries) | |||
Inserting A Row Macro | Excel Programming | |||
Inserting a Row With Macro - Help | Excel Programming |