FOR emulation

  • Thread starter Thread starter 10basetom
  • Start date Start date
1

10basetom

Dear Excel experts:

I come from a programming background and I am having a hard time tryin
to emulate a FOR loop in Excel. Here is my scenario in a nutshell:

In column B I have some data. I am trying to populate cell A1 with
comma separated list of values from column B by iterating through eac
cell in column B.

What would be the best solution for such a scenario? I reckon there'
probably more than one solution.

Thanks,
To
 
try
sub loopB()
x=cells(rows.count,"b").end(xlup).row
for each c in range(cells(1,2),cells(x,2))
if c=this then c.offset(0,-1)=that
next
end sub
 
Don said:
*try sub loopB() ...*

Hi Don,

Thanks for the input, I will try to implement this in VBA. Do you kno
if there's a way to do this using standard Excel functions?

Thanks,
To
 
Back
Top