Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default selecting month column

Hello,

My downloaded column data header is formatted by mm/yyyy through 2014, a
total of 6400 rows.

Every month, I need to run a macro that would select last months column and
copy it to column DA1.

Help, please.

TIA

DPingger
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default selecting month column


I can't visualize your file so, if desired send to my address below along
with this msg and a clear explanation.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DPingger" wrote in message
...
Hello,

My downloaded column data header is formatted by mm/yyyy through 2014, a
total of 6400 rows.

Every month, I need to run a macro that would select last months column
and
copy it to column DA1.

Help, please.

TIA

DPingger


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default selecting month column

I apologize if I wasn't very clear.

06/2009 07/2009 08/2009 09/2009
55 200 1000
300 200 50
30 200
100
100 50 2

The file looks like this, over 6400 rows and runs till 2014. Every month,
regardless of the date of the month, I need to copy the previous month's
column and paste it in column DA and yes every month, column DA data will be
overwritten. The macro will be ran anytime during the month so it will use
the =now() and determine which column is last month.

TIA, Don.

Dpingger

"Don Guillett" wrote:


I can't visualize your file so, if desired send to my address below along
with this msg and a clear explanation.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DPingger" wrote in message
...
Hello,

My downloaded column data header is formatted by mm/yyyy through 2014, a
total of 6400 rows.

Every month, I need to run a macro that would select last months column
and
copy it to column DA1.

Help, please.

TIA

DPingger



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default selecting month column

a worksheet formula would work for this

=OFFSET(A5,0,MATCH(TEXT(MONTH(TODAY())-1,"00") & "/"
&TEXT(TODAY(),"YYYY"),$B$1:$AA$1,FALSE))

put in DA1 and reolicate down

assumes columns with date headers are B1:AA1 ...change as required.
the MATCH returns the column, and then the offset returns the value for that
column for each row

"DPingger" wrote in message
...
Hello,

My downloaded column data header is formatted by mm/yyyy through 2014, a
total of 6400 rows.

Every month, I need to run a macro that would select last months column
and
copy it to column DA1.

Help, please.

TIA

DPingger


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default selecting month column

Thanks for the suggestion, Patrick. I do get a formula error, though. I'm
using 2007 would that make a difference?

Another question, how does A5 figure in the formula?

TIA

DPingger

"Patrick Molloy" wrote:

a worksheet formula would work for this

=OFFSET(A5,0,MATCH(TEXT(MONTH(TODAY())-1,"00") & "/"
&TEXT(TODAY(),"YYYY"),$B$1:$AA$1,FALSE))

put in DA1 and reolicate down

assumes columns with date headers are B1:AA1 ...change as required.
the MATCH returns the column, and then the offset returns the value for that
column for each row

"DPingger" wrote in message
...
Hello,

My downloaded column data header is formatted by mm/yyyy through 2014, a
total of 6400 rows.

Every month, I need to run a macro that would select last months column
and
copy it to column DA1.

Help, please.

TIA

DPingger




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
Selecting different cells each month Solomon Excel Worksheet Functions 2 February 18th 10 09:36 AM
Selecting the current month using a macro on a pivot table Newbee Excel Discussion (Misc queries) 3 November 12th 06 07:10 PM
Text to column and selecting values based on a different column torooo Excel Discussion (Misc queries) 1 October 18th 06 07:27 PM
ytd sum by selecting month Greg Excel Worksheet Functions 1 June 20th 05 10:17 PM
Fill column with dates of month depending on month in A1 [email protected] Excel Programming 7 March 11th 05 12:41 AM


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