Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Populate a column with a month end data


Hello,

I am using Excel 2002 and I am wondering if this is possible. I get a daily
report from our main frame exporting data in Excel. What I want to do is
have a macro button that will put the month ending data on the last column.
Now I may get about 200 rows of data or 300 rows of data depending upon the
months activity. For example I will have a dialog box pop up after I press
the macro button requesting what is the month end (10/31/2005) then on the
last rows will show 10/31/2005 depending upon the size of the data exported.
Is this possible? Thank you in advance.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Populate a column with a month end data

maybe something like this. just substitute the sheetname and the column you
need. i used sheet1 and column B in this example
this would sum everything from B2 to the last row in column B and put the
total in the next row.


Sub test()
lastrow = Worksheets("Sheet1").Cells(Rows.Count, "B").End(xlUp).Row

Range("B" & lastrow + 1).Formula = "=sum(B2:B" & lastrow & ")"

End Sub


--


Gary


"Alex Martinez" wrote in message
...

Hello,

I am using Excel 2002 and I am wondering if this is possible. I get a
daily report from our main frame exporting data in Excel. What I want to
do is have a macro button that will put the month ending data on the last
column. Now I may get about 200 rows of data or 300 rows of data depending
upon the months activity. For example I will have a dialog box pop up
after I press the macro button requesting what is the month end
(10/31/2005) then on the last rows will show 10/31/2005 depending upon the
size of the data exported. Is this possible? Thank you 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
populate month-yyyy when compare 2 cells AskExcel Excel Worksheet Functions 3 May 13th 10 02:14 AM
Populate days of the month in a column by checking on date Joe Excel Worksheet Functions 4 March 5th 09 05:56 AM
Populate column based on data in other cells JR Excel Discussion (Misc queries) 2 September 4th 07 05:38 PM
Populate a column of data with a formula using a drop down list nafflerbach Excel Discussion (Misc queries) 1 May 24th 07 12:20 PM
how to populate a 3rd column with with data from 1st or 2nd colum leo Excel Discussion (Misc queries) 2 February 3rd 06 12:48 PM


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

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

About Us

"It's about Microsoft Excel"