ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cell address (https://www.excelbanter.com/excel-programming/365327-cell-address.html)

Kate[_2_]

cell address
 
Hi,
I have a macro that does some stuff and selects a cell using
cell.address
But the cell I want is then actually 1 row down and 1 column to the
left.

Because cell address is a string, I can't go Range("A" & myCell + 1),
so what should I do?

Thanks
Kate


Don Guillett

cell address
 
have a look at
..offset(-1,-1)

--
Don Guillett
SalesAid Software

"Kate" wrote in message
oups.com...
Hi,
I have a macro that does some stuff and selects a cell using
cell.address
But the cell I want is then actually 1 row down and 1 column to the
left.

Because cell address is a string, I can't go Range("A" & myCell + 1),
so what should I do?

Thanks
Kate




Bob Phillips

cell address
 
Range("A" & myCell).Offset(1,1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Kate" wrote in message
oups.com...
Hi,
I have a macro that does some stuff and selects a cell using
cell.address
But the cell I want is then actually 1 row down and 1 column to the
left.

Because cell address is a string, I can't go Range("A" & myCell + 1),
so what should I do?

Thanks
Kate




Don Guillett

cell address
 
Bob and I were both wrong
..offset(1,-1)

--
Don Guillett
SalesAid Software

"Kate" wrote in message
oups.com...
Hi,
I have a macro that does some stuff and selects a cell using
cell.address
But the cell I want is then actually 1 row down and 1 column to the
left.

Because cell address is a string, I can't go Range("A" & myCell + 1),
so what should I do?

Thanks
Kate




Bob Phillips

cell address
 
Never could tell left from right <g

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Don Guillett" wrote in message
...
Bob and I were both wrong
.offset(1,-1)

--
Don Guillett
SalesAid Software

"Kate" wrote in message
oups.com...
Hi,
I have a macro that does some stuff and selects a cell using
cell.address
But the cell I want is then actually 1 row down and 1 column to the
left.

Because cell address is a string, I can't go Range("A" & myCell + 1),
so what should I do?

Thanks
Kate






Kate[_2_]

cell address
 
Yeah, I figured :-)



All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com