DekHog
08-02-2007, 11:49 AM
Hi all...
Can anyone help get me started with a bit of VBA for a macro I'm trying to put together ? (newbie...very)!
I've got a column (A) with text in it, but some of the references have been truncated by the program it was exported from... it runs like:
SAT-200621
SAT-200621
-200621
SAT-200731
As you can see, the 'SAT has been removed - what I need is a bit of code to insert into the macro to look at column A and add the 'SAT' to anything that doesn't have it.
Just to explain - the prefix 'SAT' is on everything (or should be) and the next 4 figures are the year with the last two being the week number.
My other issue is this... is there any way to rename a worksheet in VBA without knowing the original name? The program outputs names like ~A24521 on the tab, and I want to select the workbook by browsing to it then renaming the sheet to 'Data' using VBA?
Many Thanks
Can anyone help get me started with a bit of VBA for a macro I'm trying to put together ? (newbie...very)!
I've got a column (A) with text in it, but some of the references have been truncated by the program it was exported from... it runs like:
SAT-200621
SAT-200621
-200621
SAT-200731
As you can see, the 'SAT has been removed - what I need is a bit of code to insert into the macro to look at column A and add the 'SAT' to anything that doesn't have it.
Just to explain - the prefix 'SAT' is on everything (or should be) and the next 4 figures are the year with the last two being the week number.
My other issue is this... is there any way to rename a worksheet in VBA without knowing the original name? The program outputs names like ~A24521 on the tab, and I want to select the workbook by browsing to it then renaming the sheet to 'Data' using VBA?
Many Thanks