Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF statement not returning a blank so a chart line won't gap mikekaf Charts and Charting in Excel 3 January 2nd 08 09:36 PM
Formula returning current user name TBoeck Excel Worksheet Functions 5 October 3rd 06 07:53 PM
formula IF returning current date diane Excel Worksheet Functions 1 March 10th 05 06:54 AM
Add line between previous and current cells . . Jeff Roper[_5_] Excel Programming 0 November 12th 04 11:31 AM
Add line between previous and current cells . . Jeff Roper[_4_] Excel Programming 1 November 11th 04 11:08 AM


All times are GMT +1. The time now is 07:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"