Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
AT AT is offline
external usenet poster
 
Posts: 18
Default How do I write an Excel macro when the cell range changes weekly?

I need to write a macro but the range of data will change every time I access
the report. I don't know how to specify a range that isn't static.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default How do I write an Excel macro when the cell range changes weekly?

last non empty cell in column A :
rw=sheets("Sheet1").cells(65536,1).end(xlup).row

or select from activecell to last cell :
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select

"AT" skrev:

I need to write a macro but the range of data will change every time I access
the report. I don't know how to specify a range that isn't static.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I write an Excel macro when the cell range changes weekly?

Data is in multi-rows and columns or in one column or??

What you want is doable but need more info please.

Example...................

Set rng = Range(Range("B1"), Cells(Rows.Count, 2).End(xlUp))

rng will be from B1 down to the last cell in column B with data


Gord Dibben MS Excel MVP


On Wed, 12 Dec 2007 13:15:00 -0800, AT wrote:

I need to write a macro but the range of data will change every time I access
the report. I don't know how to specify a range that isn't static.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default How do I write an Excel macro when the cell range changes weekly?

Define "isn't static"... Increasing rows? Increasing columns? Address changing?
--
HTH...

Jim Thomlinson


"AT" wrote:

I need to write a macro but the range of data will change every time I access
the report. I don't know how to specify a range that isn't static.

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
How to write a macro to modify an Excel chart raymondvillain Charts and Charting in Excel 4 July 14th 07 05:38 PM
Date Range -- Weekly Brad Payne Excel Worksheet Functions 2 October 20th 05 12:00 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 24th 05 12:38 AM
How to write a macro to get the system time in excel 97 Raj Excel Discussion (Misc queries) 6 April 20th 05 08:20 PM
how do I write a formula that will figure weekly overtime? jasperPcuccumber Excel Worksheet Functions 16 April 18th 05 04:07 AM


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