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: 6
Default need advise on mycode

Hi

Would like some advice on how to write a macro to do the actions
below:

I will create 12 worksheets for each month containing 2 groups of
items at the starting
of each month.

groups - fruits & veg
eg Jan worksheet will contains fruits & veg sold in this month.
A1 B1 C1
A1 group item name Qty
2 fruits apple 10
3 veg carrot 52

i have a summary page to display the sum for each groups for each
month.

summary pg
A1 B1
1 Jan Feb
2 fruits sum
3 veg sum

I have created a macro to create the a new worksheet for each new
month.
how can i use the code below to work for different month =

sub totalgroup()

set WS2 as the worksheet for jan
set x to be the cell containing fruits sum
x.Formula = "=sumif('WS2'!A2:A1000, ""FRUIT"", 'WS2'!F2:F10000)"

end sub

WS2 will change for different month

How do i change it such that it will work for different month?Do i
pass in
the worksheet name?

Thank you for any suggestions provided.

kiwis

 
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
advise pls Hopeless With excel Excel Programming 1 January 22nd 06 04:49 PM
pls advise George Excel Worksheet Functions 2 February 25th 05 08:22 PM
I need some Advise Tom Ogilvy Excel Programming 0 October 16th 04 12:50 AM
Advise VBA No Name Excel Programming 7 December 3rd 03 07:14 PM
VBA Advise RB[_3_] Excel Programming 1 July 15th 03 03:26 AM


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