![]() |
#1
|
|||
|
|||
![]() I am currently having a problem with this loop. Code:
last_col = 1 Do Until IsEmpty(Cells(last_col, 1)) tempstr = ActiveSheet.Range(last_col & First_row).Value If InStr(tempstr, "(Apple)") > 0 Then str = Split(last_col & First_row, "(") ActiveSheet.Range(last_col & First_row).Value = str & "Red Apple" End If last_col = last_col + 1 Loop |
#2
|
|||
|
|||
![]()
Try using Cells, as you do in the IsEmpty line, rather than Range
|
#3
|
|||
|
|||
![]() Quote:
The incrimination portion of the loop works great. The only real problem as of now is getting the title of each column to save to the temporary string. |
#4
|
|||
|
|||
![]()
Figured out the problem. On the
Code:
tempstr = ActiveSheet.Cells(last_col, First_row).Value |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Twizzle008 | Word VBA | 15 | 09-18-2015 03:20 PM |
![]() |
jrt | Excel Programming | 1 | 04-16-2015 01:46 PM |
![]() |
sorengg | Mail Merge | 5 | 03-14-2013 10:06 PM |
![]() |
Jennifer Murphy | Word VBA | 1 | 01-29-2013 03:30 AM |
While loop not working right | Cbrehm | Excel Programming | 0 | 05-11-2011 11:05 AM |