-
Solved: Adding pre-fixes
Can anyone help with this? I thought I could insert columns and do concatenations, as easy as this was because I have coded following code too look at column A , I thought to automate it like this may be easier in the long run. Can anyone help? Many thanks in advance.
[VBA]
Sub AddPrefixes()
Dim PreCol As Long 'or range?
For Each PreCol In Sheets("Database")
Select Case PreCol.Value
Case "a", "b", "c"
ActiveCell.Offset(1, 0).Select
Select Case "a"
' Everything under this col heading, uptil next column heading (not including next column heading) should be prefixed with "Test 1 -"
Select Case "b"
' Everything under this col heading, uptil next column heading (not including next column heading) should be prefixed with "Test 2 -"
Select Case "c"
' Everything under this col heading, uptil next column heading (not including next column heading) should be prefixed with "Test 3 -"
End Select
Next PreCol
End Sub [/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules