Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Macro Problem!?

Hey Guys/Girls,

I'm trying to create a Macro that takes weekly data for a months tim
frame and creates averages for trend tracking. The end result would b
a graph for a visual presentation. The macro is almost complete
however, the macro I made has to adjust for future month "structures
(i.e. 4 or 5 weeks in a month). The macro built was based on a 5 wee
month, yet when I run the macro with a 4 weeks worth of data it get'
caught up on the 5th week because it's blank.

Is there a way to say if worksheet "x" is blank skip the followin
steps in the macro. The work sheet with data has been included and th
run funtion is (Ctrl+ E).

'Link' (http://www.iamhetero.com/fun/Monthly Average.xls)

Also, is there a way when copying information after it's bee
subtotalled to pasted it without the hidden information?

Thanks for all your help,

Kevi

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel Macro Problem!?

Why not just put a code in a cell when there is no week 5, and check that in
the VBA?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"hbp78 " wrote in message
...
Hey Guys/Girls,

I'm trying to create a Macro that takes weekly data for a months time
frame and creates averages for trend tracking. The end result would be
a graph for a visual presentation. The macro is almost complete;
however, the macro I made has to adjust for future month "structures"
(i.e. 4 or 5 weeks in a month). The macro built was based on a 5 week
month, yet when I run the macro with a 4 weeks worth of data it get's
caught up on the 5th week because it's blank.

Is there a way to say if worksheet "x" is blank skip the following
steps in the macro. The work sheet with data has been included and the
run funtion is (Ctrl+ E).

'Link' (http://www.iamhetero.com/fun/Monthly Average.xls)

Also, is there a way when copying information after it's been
subtotalled to pasted it without the hidden information?

Thanks for all your help,

Kevin


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Macro Problem!?

I'm sorry...I'm actually pretty new to macros and barely know code.
Could you possibly provide an example? :

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel Macro Problem!?

Kevin,

I am not too conversant with you spreadsheet, and how you determine whether
the month has 4 or 5 weeks, but assuming you have some readily identifiable
rule for that, you could use that rule to populate cell A1 say with TRUE or
FALSE and then test like

For i = 1 To 5
If Worksheets(i).Range("A1").Value = TRUE Then
'rest of your code
End If
Next i

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"hbp78 " wrote in message
...
I'm sorry...I'm actually pretty new to macros and barely know code.
Could you possibly provide an example? :(


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Macro Problem!?

Bob...Thank you so much it worked perfect

--
Message posted from http://www.ExcelForum.com

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
Excel 2007 Macro Problem Robby Charts and Charting in Excel 9 March 12th 08 09:28 AM
Excel-Macro Problem SR Excel Discussion (Misc queries) 8 July 20th 07 06:32 AM
Macro problem in Excel pd Excel Discussion (Misc queries) 2 March 14th 06 05:49 AM
problem with macro on Excel Captain Picard Excel Worksheet Functions 0 February 1st 06 09:20 PM
Excel XP macro problem Paul Reeve Excel Programming 1 November 10th 03 11:26 PM


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