ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Increase column heading letters withing routine? (https://www.excelbanter.com/excel-programming/355311-increase-column-heading-letters-withing-routine.html)

Adam

Increase column heading letters withing routine?
 
After each time my program cycles through a For routine, I want it to
increase the column heading letter so that the next time it cycles through, I
can have it input data in the next column. Is there a way to do this? Thank
you.

Ardus Petus

Increase column heading letters withing routine?
 
Selection.Offset(0,1).select

HTH
--
AP

"Adam" a écrit dans le message de
...
After each time my program cycles through a For routine, I want it to
increase the column heading letter so that the next time it cycles

through, I
can have it input data in the next column. Is there a way to do this?

Thank
you.




Bob Phillips[_6_]

Increase column heading letters withing routine?
 
For i = 1 to lastNum
columnNum = i+4 'exampl starts at column E
Cells(1, columnNum_.value = "somevalue" 'E1, F1, etc.
Next i

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Adam" wrote in message
...
After each time my program cycles through a For routine, I want it to
increase the column heading letter so that the next time it cycles

through, I
can have it input data in the next column. Is there a way to do this?

Thank
you.





All times are GMT +1. The time now is 10:30 AM.

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