shift right 5 columns

  • Thread starter Thread starter raymond chiu
  • Start date Start date
R

raymond chiu

Dear All,

I am using VB to manipulate the excel.

How can I get the cell(e.g. "AB4", column AB and Row4) if I want to shift
25 columns to right from "F4" cell.

What the formula should be in VB or excel?

Thanks,
 
VBA................

Activecell.Offset(0,25).Select to go to the cell 25 columns to right

Range("F4").Offset(0,25).Select to go to the cell

Range("F4").Value = Range("F4").Offset(0, 25).Value to return the value

Formula..................

=OFFSET(F4,0,25) will return the value of AE4

=OFFSET(F4,0,22) will return the value of AB4


Gord Dibben Excel MVP
 

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