Macro prompt to enter data from user-selected sheets

mtravis38

Board Regular
Joined
Apr 13, 2010
Messages
61
I'd like to create a macro to import data from the same cell from several different sheets. The trick is that the sheets vary each time the macro is run, so there needs to be a prompt to select the sheets from which to import the data. I also need the macro to add these values together, if possible. For example:

Sheet: Value (assume each value is in cell A1)

Sheet 1: 100
Sheet 2: 150
Sheet 3: 200
Sheet 4: 300

When the macro is prompted, I'd like to add the values from sheets 1 thru 3, and copy this value into a specified cell, let's say cell C1 in sheet 5. Perhaps another time I run the macro, I want to add the values in sheets 2 thru 4, and copy into a specified cell. The destination cell will never change.

I am using Excel 2010.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,540
Messages
6,179,417
Members
452,912
Latest member
alicemil

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