LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro Programming Syntax

I have a workbook with 2 worksheets, SUM and Weekly Forecast. Based on the
weekly forecast we hold excess stock of product for a predetermined number of
weeks. The number of weeks can change with each quarter of the year. I am
trying modify the file so that when a new forecast is loaded Excel will
create updated excess stock values.

From the Excel side:

I have my cursor in cell N5, the date in cell N4 is 06-FEB-06, cell N3 has
the value 1 from the formula =1+INT((MONTH(N$4)-1)/3) {this tells which
quarter to use}. Column B contains the value for each item for the first
quarter, Col E is Q2, Col H is Q3 and Col K is Q4. I have a formula which I
manually enter to calculate the excess based on that quarters value. That
formula is: =IF($B5=0,0,SUM('Weekly Forecast'!O5:OFFSET('Weekly
Forecast'!O5,0,SUM!$B5-1))).

This works fine for the first quarter, but when I get into the second
quarter I have to manually change $B5 to $E5 and so on. This gets very
cumbersome.

What I would like is some method to read the month value from row 3 and use
this to determine which col to use to get the weeks value.

I have been banging my head on this for a few weeks to any help would be
appreciated.

--
Thanks in advance,
JC
 
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
help with macro syntax Steve Excel Discussion (Misc queries) 2 February 10th 09 06:59 PM
Urgent - Macro Programming Help Need Akram_MIM Excel Programming 2 March 14th 05 09:15 AM
Need Help with Programming-Syntax/Compile Errors clk[_2_] Excel Programming 6 January 17th 05 11:21 PM
Macro programming Kristin Excel Programming 1 September 27th 04 06:27 PM
Macro Programming Jamie[_3_] Excel Programming 1 August 27th 03 08:20 PM


All times are GMT +1. The time now is 03:03 AM.

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"