Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Setting a range that varies

I am trying to create a chart from a range that has dates in Column a
(starting at Row 5) and share value in Column B
THis works
Range("A5:B7").Select
but what I can't find how to do is how to set it from A5 to the last cell
with data in column B rather than B7 because as I add data I want the chart
to update.

I am sure it is very simple.
Any clues please
Stephen


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Setting a range that varies


cLastRow = Cells(Rows.Count,"B").End(xlUp).Row
Range("A5:B" & cLastRwo).Select

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stephen English" wrote in
message ...
I am trying to create a chart from a range that has dates in Column a
(starting at Row 5) and share value in Column B
THis works
Range("A5:B7").Select
but what I can't find how to do is how to set it from A5 to the last cell
with data in column B rather than B7 because as I add data I want the

chart
to update.

I am sure it is very simple.
Any clues please
Stephen




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Setting a range that varies



"Bob Phillips" wrote:


cLastRow = Cells(Rows.Count,"B").End(xlUp).Row
Range("A5:B" & cLastRwo).Select

--
Bob,

Thanks for this. It helped me solve a problem that has been bugging me for 2
days.
HTH

RP
(remove nothere from the email address if mailing direct)


"Stephen English" wrote in
message ...
I am trying to create a chart from a range that has dates in Column a
(starting at Row 5) and share value in Column B
THis works
Range("A5:B7").Select
but what I can't find how to do is how to set it from A5 to the last cell
with data in column B rather than B7 because as I add data I want the

chart
to update.

I am sure it is very simple.
Any clues please
Stephen





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
Can a range be copied if it varies in size? TheMilkGuy Excel Discussion (Misc queries) 4 August 12th 09 10:05 PM
% allocated over time varies AK Excel Worksheet Functions 1 October 9th 08 01:04 AM
Sum of a range that varies Sebastien Excel Discussion (Misc queries) 1 February 19th 08 04:19 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
VBA setting Range Jeff Excel Discussion (Misc queries) 1 December 2nd 05 07:36 PM


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