How to specify a range in VBA based on values in cells

  • Thread starter Thread starter Comcast Mail
  • Start date Start date
C

Comcast Mail

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top