Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a bit of code that will search through each cell in a column and look
for Agent Name: then choose cell to its right and create a new sheet with the value of the selected cell as the name. Below I have added what I tried, which obviously did not work. Any help on this would be greatly appreciated. (Note, I can make the new sheet and name it, so my test code just had a msgbox pop up with the value for testing) =-=-=-=-=-=-=-= Dim rngEdit As Range Dim trow As Integer Dim tcol As Integer Dim tname As String Sub LoopIt() trow = 1 tcol = 3 Set rngEdit = ActiveSheet.Cells(trow, tcol) Do Until rngEdit.Value = "Agent Name:" trow = trow + 1 Loop tcol = tcol + 1 tname = ActiveSheet.Cells(trow, tcol).Value tcol = tcol - 1 MsgBox trow & " " & tcol End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loops | Excel Programming | |||
Loops | Excel Programming | |||
Vlookup macro that returns data from worksheet, then Loops | Excel Programming | |||
Vlookup macro that returns data from worksheet, then Loops | Excel Programming | |||
for each loops | Excel Programming |