Hi Guys, i have an excel spreadsheet and i've written a macro to try to put dashes (hyphen) in between the letters and numbers. I believe i'm nearly there but if you look at the attachment i can't seem to get a dash in between the last two characters. For example, in the first number i need a dash in between the 8 and the A. I've tried adding extra mids and altering the number in the Right value but to no avail. Please help, this is driving me nuts!!
Formula:
=LEFT(A29,2)&"-"&MID(A29,3,2)&"-"&MID(A29,5,2)&"-"&MID(A29,7,2)&"-"&RIGHT(A29,1)
ActiveCell.FormulaR1C1 = _ "=LEFT(RC[-1],2)&""-""&MID(RC[-1],3,2)&""-""&MID(RC[-1],5,2)&""-""&MID(RC[-1],7,2)&""-""&RIGHT(RC[-1],1)"
Regards
cheers TMShucks, this worked a treat. extremely grateful, many thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks