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.
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.