Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to specify a range in VBA based on values in cells

I'm a novice trying to build a macro that will select a range based on
values from calculated cells on a worksheet.

The macro should select a range denoted by the values of the two calculated
cells in the same row as the active cell.

Thanks in advance for your advice.

Donald Prebus
Vancouver WA


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default How to specify a range in VBA based on values in cells

Donald

not much detail of how you specify the cells so, you'll need something like:

Range(Range("A1").value & ":" & Range("A2").Value).Select

Where A1 contains a cell reference, for example, B1. Cell A2 contains the
next cell, for example, G17. In this case the range B1 to G17 will be
selected.

Regards

Trevor


"Comcast Mail" wrote in message
...
I'm a novice trying to build a macro that will select a range based on
values from calculated cells on a worksheet.

The macro should select a range denoted by the values of the two
calculated cells in the same row as the active cell.

Thanks in advance for your advice.

Donald Prebus
Vancouver WA



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
Conditionally Formatting Cells based on Values in a Range (2007) sreid64 Excel Worksheet Functions 3 August 26th 09 08:15 PM
Backgroud color for 1 cell based on a range of cells values schmill Excel Discussion (Misc queries) 3 July 29th 09 02:18 AM
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Sum values in columns based on values in named range Mikael Andersson Excel Worksheet Functions 10 November 12th 08 09:37 AM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 06:28 PM.

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"