View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Loop thru variables

If you have a simple list of the states

for each c in range("a2:a6")
run your code
next c
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Madiya" wrote in message
ups.com...
On Oct 15, 12:24 pm, cablegui wrote:
On Oct 15, 12:11 pm, Madiya wrote:

I have 5 variables which I want to run macro for.
If it was nos, I would have done for i=1 to 5 loop
but these are variables.
How can I run a loop on this?
Kindly suggest.


Regards,
Madiya


Could you please tell me the purpose of this program?
What are you trying to attempt to do?

Regards
Neville.


Thanks for your reply.
I am trying to creat report for different states from one of our
master records workbook.
This requires me to filter out the required state and copy filtered
records to a new book.
I have the entire program ready where I am manually entering the state
code in a input box.
This works fine.
I want to eliminate input box and run the programm for selected
states.

Regards,
Madiya.