Stuck with possible loop vba

Alpacino

Well-known Member
Joined
Mar 16, 2011
Messages
511
Hi again,
I have a macro say Test1.
Test 1 extracts data from one workbook to another.
That works fine. It uses 3 different data validation lists to get the right info.
One data validation list (range from A26:A50 data validation is in A2.) is full of different business which have their own worksheet in my new workbook.

I select a business from the data validation a2 then run macro.

What I like to do is run a macro that will do all business withthe same macro test1.

Thanks in advance
Alan
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Alan,

Not sure if i understood correctly, but maybe something like (adjusting macro Test1 code if necessary)

Code:
Sub testLoop()
    Dim i As Long
 
    For i = 26 To 50
        Range("A2") = Range("A" & i)
        'Code of macro Test1 here
        'or Call Test1
    Next i
End Sub

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top