Increment Columns by 1


G

Guest

Does anyone know how I can increment column references in the range feature
by 1? For example: In my for loop, in the first iteration Range("G" & i
).value = 0, for the next iteration I need it to be Range("H" & i ).value =
0. Any ideas on how to do that? Thanks!
 
Ad

Advertisements

G

Gary Keramidas

use cells instead of range:

for i = 7 to 10
cells(1,i).value = 1
next

would put the value of 1 in row 1 of columns g - j
 
G

Guest

Awesome, thank you!

Gary Keramidas said:
use cells instead of range:

for i = 7 to 10
cells(1,i).value = 1
next

would put the value of 1 in row 1 of columns g - j
 
Joined
Oct 10, 2020
Messages
3
Reaction score
0
HI
ina Excel macro
I need to move cells in one column from 1st worksheet to another worksheet..
(in the first worksheet is column of Purchase Order data: PO #, PO name, Item, etc)

The 2nd worksheet is a PO form. each cell in a column in the 1st worksheet needs to be moved to the PO.

example cell A2 in 1st workbook needs to be moved to G12 in the 2nd workbook
cell A3 in 1st workbook needs to be moved to H6 in the 2nd workbook
.
.
When done Ill print the PO


next step will be to increment column in 1st worksheet to B and repeat building a PO then print.


Think I can do most of this what I need to know is how to to copy cells from one sheet another with a variable column


Thanks for your help
Steve
 
Ad

Advertisements


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

Top