ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Incrementing Column Values (https://www.excelbanter.com/excel-programming/432347-incrementing-column-values.html)

William Wolfe

Incrementing Column Values
 
I can increment a row value by doing an experssion i = i+1

How do I do the same for an column value and does Z roll up to AA?

Thanks,

W. Wolfe



Bob Umlas[_3_]

Incrementing Column Values
 
Same way, and yes.

"William Wolfe" wrote in message
...
I can increment a row value by doing an experssion i = i+1

How do I do the same for an column value and does Z roll up to AA?

Thanks,

W. Wolfe




William Wolfe

Incrementing Column Values
 
I am confused. Row values are integers and columns are alpha characters.
How do I dim the value for the column?

Thanks,

"Bob Umlas" wrote in message
...
Same way, and yes.

"William Wolfe" wrote in message
...
I can increment a row value by doing an experssion i = i+1

How do I do the same for an column value and does Z roll up to AA?

Thanks,

W. Wolfe






Rick Rothstein

Incrementing Column Values
 
They are only alpha values for your convenience... VBA sees them either way
depending on the method or property you are using. Here are few ways to
increment the column (I'll use a Select method to show it to you, but rarely
is it necessary to actually have to select any range in order to work with
it).

Set R = Range("A1")
R.Offset(,1).Select

or....

Set R = Range("A1")
Cells(1, R.Column + 1).Select

or...

Set R = Range("A1")
Range("A" & (R.Column + 1)).Select

--
Rick (MVP - Excel)


"William Wolfe" wrote in message
...
I am confused. Row values are integers and columns are alpha characters.
How do I dim the value for the column?

Thanks,

"Bob Umlas" wrote in message
...
Same way, and yes.

"William Wolfe" wrote in message
...
I can increment a row value by doing an experssion i = i+1

How do I do the same for an column value and does Z roll up to AA?

Thanks,

W. Wolfe








All times are GMT +1. The time now is 12:36 AM.

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