I'm much more familiar with Access but this project demands using Excel. This may be a simple solution but will throw out the problem anyway.
I have a database with multiple sheets. On sheet1, in column G are phone numbers, some with labels after the end (i.e.: 333-444-5555c), some with no labels (i.e. 222-333-4444).
In sheet 2, in column G, I want to fill the column with only the phone numbers (no labels) using VBA code. I can autofill the column using (Range("G2:G" & lRow).Formula = "=G2") but that fills the entire row with the labels as well. I also want to autofill column H in sheet2 with the labels. To further muddy the issue, I would like to fill column H on sheet 2, not with just the label (i.e. c), but to spell out what the label is (i.e. if "c" then fill it with "cellular" or if "h" then fill it with "home" and so on).
I've tried (erased the code because it wasn't working so I can't share it) something along these lines:
Dim Phone1Len As Long
Dim Phone1Kind As Long
Phone1Len = Len(Sheets("Sheet1").Range("G2")) *Note: this gives me a correct length of the cell
This is where I've ran into issues. I want to now find the data after the 12th character in the cell from Sheet1, cell G2. I've tried:
Phone1Kind = "=Right(Sheets("Imported Raw Data"), (G2), (Phone1Len) - 12)"
I'll stop here for now as I think I have most of the rest figured out, but have had issues with the above sentence.
Thanks in advance