Returning to same column on current line?

  • Thread starter craiglittleperth
  • Start date
C

craiglittleperth

Hi guys and girls,

I am trying to return to a specific cell, in a specific column where I
am on a specific row?

i.e. I am in N21, and need to return to G22?

I konw there is an easy answer to this, but I have hunted high and low
all morning...

thanks in advance.

Craig
 
M

Mike H

Hi,

When you say return, for the most part you don't have to actually be in a
cell to do something to it or read from/to it. However, try this

Range("G22").select

Mike
 
B

brzak

need to return what exactly?

do you want to write the formula "=N22" in G11 programatcally?

maybe a little more explanation would help, i don't understand how
these are connected:

"same column on current line"
"I am in N21, and need to return to G22"
 
C

craiglittleperth

Apologies all,

Didn't explain myself correctly.

I have a macro that ends in a specific cell (which could be on cell on
the same line i.e. N21) i would like to then select the corresponding
cell in column G, however, down one line? i.e. G22?

This is what I have below.

Thanks

Craig


Sub Run_Multi_Line()

'runs Macro "Bars", which ends in last cell in range, on same row.

Range("G5").Select
Do While ActiveCell.Value <> "Stop"
If ActiveCell.Value = "*" Then
Bars
Else
ActiveCell.Offset(1, 0).Select <<<<< I need to change this to
select column G, down one row from current?
End If
Loop

End Sub
 
M

Mike H

Maybe this

Sub Run_Multi_Line()

'runs Macro "Bars", which ends in last cell in range, on same row.

Range("G5").Select
Do While ActiveCell.Value <> "Stop"
If ActiveCell.Value = "*" Then
Bars
Else
Range("G" & ActiveCell.Row + 1).Select

End If
Loop

End Sub

Mike
 
Top