Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Week numbers 1 to 7 are in Row 5 Columns L to U.
The data for each week is in Row 8 Columns L to U. I basically have a macro to do this (this will be expanded to cover the 52 weeks). Range("D9").Select ActiveCell.FormulaR1C1 = "=R[-1]C[17]" Range("E9").Select ActiveCell.FormulaR1C1 = "=SUM(R[-1]C[14]:R[-1]C[16])" Range("F9").Select ActiveCell.FormulaR1C1 = "=SUM(R[-1]C[6]:R[-1]C[10],R[-1]C[13]:R[-1]C[15])" Range("I17").Select End Sub The macro above is only an example. What I would like to do is to have a macro start when the week number is typed into cell D8 and the data is extracted and put into the relevant cells detailed below. Cell D9 has the data for that particular week For week 1 it is cell L8. For week 6 it would be T8. Cell E9 has the data added together for each week in the month. So if I select February Week 7, week 5, 6 and 7 (S8:U8) are added together and put in Cell F9. Many thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you start a Macro? | New Users to Excel | |||
error when running cut & paste macro | Excel Worksheet Functions | |||
link to combobox | Excel Discussion (Misc queries) | |||
Macro to Start an Application | Excel Discussion (Misc queries) | |||
Start Macro Daily task | Excel Discussion (Misc queries) |