#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Macro Start

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you start a Macro? Michael New Users to Excel 7 February 27th 10 04:55 PM
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
link to combobox legepe Excel Discussion (Misc queries) 4 July 26th 06 04:45 PM
Macro to Start an Application Joe Teixeira Excel Discussion (Misc queries) 3 April 26th 06 06:36 PM
Start Macro Daily task GoBucks Excel Discussion (Misc queries) 1 November 10th 05 04:34 PM


All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"