Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning to same column on current line?
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning to same column on current line?
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 " wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning to same column on current line?
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" On Oct 9, 12:09*pm, wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning to same column on current line?
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning to same column on current line?
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 " wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF statement not returning a blank so a chart line won't gap | Charts and Charting in Excel | |||
Formula returning current user name | Excel Worksheet Functions | |||
formula IF returning current date | Excel Worksheet Functions | |||
Add line between previous and current cells . . | Excel Programming | |||
Add line between previous and current cells . . | Excel Programming |