View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Loop macro in selected range

Then us

Sub standard()
For Each c In selection
c.Select
Application.Run "Macro1"
Next
End Sub

Mike


"Sjaakve" wrote:

That was fast.

That helps a lot. Only, the range is not always the same. Next time i
might want to select B12,G3,D2:F5 and run the macro for each cell.

Macro1() does not turn the cell red, it was just an example. I didn't
want to complicate things any further.

Is it possible the range is variable?

thanx

Sjaak