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: 17
Default how to auto update sum?


Hi all

I have to run SUM from the last day of the month to A5 for column A and
B5 for coulmn B(I have 2 column in which I type data) The code I have
here does the job, but only if you actually open the sheet at type
somthing that day. If I don't type in anything that day, then it does
not opdate and I would have skipped a month :(

any help appreciated

This is part of the code:


---------------------------------------------------------------------------*------------------------------------------



Jan:


With Target


If .Column < 1 Then GoTo Jan2
If DateNow < DateJan Then GoTo Feb


Application.EnableEvents = False
Range("I6").Value = Application.Sum(Range(Target, Range("A5")))



Application.EnableEvents = True


End With


Jan2:


With Target


If .Column < 2 Then GoTo InsertDate
If DateNow < DateJan Then GoTo Feb2


Application.EnableEvents = False
Range("J6").Value = Application.Sum(Range(Target, Range("B5")))

Application.EnableEvents = True


End With


---------------------------------------------------------------------------*------------------------------------------



- Column 1 and 2 are where I type in the amount of units I make.
- "I6" and "J6" are were they are stored.
- "InsertDate" is a third column were the date is.
- "DateJan" is the last date of the month where the data is sumed and
stored in the fields "I6" and "J6" and voila the graph apprears.
- "B5" is the first data field


But the big problem is that this only happens IF I type in anything
that particular date! If I don't make anything or it is a weekend then
im screwed! The graph just won't get updated...then the next month I
get the total number of units made for 2 month and not just 1 because
it didn't update the last month.


help thanks


San


Besvar »

 
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
Sometimes formuli in workbook don't auto update with auto-recal on PE2 Excel Worksheet Functions 1 October 12th 06 03:49 PM
Help! How do I Auto-Update? Sethaholic[_13_] Excel Programming 1 July 15th 05 09:48 PM
how to update data on sheet1 and have it auto update on sheet2 Tommy Excel Programming 6 May 11th 05 06:41 PM
excel links update not working in auto, calculations in auto Mikey Boy Excel Worksheet Functions 0 December 7th 04 11:53 PM
Auto update... Fu Manchu[_2_] Excel Programming 2 January 13th 04 05:20 PM


All times are GMT +1. The time now is 12:31 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"