Hoozits
Active Member
- Joined
- May 31, 2005
- Messages
- 253
I am using a for...next loop and would simply like to display the result of that loop in a cell on a spreadsheet at each iteration. Any help would be greatly appreciated. Here is an example:
for j = 101 to 111
for k = 1 to 100
if cells(k,3)="Mr. Excel" then
cells(j, 1)=cells(k,2)
end if
next k
next j
The problem I am having is that only the last value for k is being used to produce results in cells(j,1). The j-loop works fine, but the k-loop is not. Thanks in advance for any help.
for j = 101 to 111
for k = 1 to 100
if cells(k,3)="Mr. Excel" then
cells(j, 1)=cells(k,2)
end if
next k
next j
The problem I am having is that only the last value for k is being used to produce results in cells(j,1). The j-loop works fine, but the k-loop is not. Thanks in advance for any help.