Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,688
Default Change reference style in line of code

Hi Folks!

Application.Goto Reference:="INDIRECT(R1C4)"

How do I change the R1C1 reference to an A1 reference?

When I use either "D1" or D1 I get errors.

Thanks

Biff


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Change reference style in line of code

Application.goto worksheets("sheet1").range("d1")

Qualify as much as you like (include the workbook, too???).



Biff wrote:

Hi Folks!

Application.Goto Reference:="INDIRECT(R1C4)"

How do I change the R1C1 reference to an A1 reference?

When I use either "D1" or D1 I get errors.

Thanks

Biff


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,688
Default Change reference style in line of code

Hi Dave!

I don't want to go to cell D1.

Let me explain.... (this is very similar to that other post in .Misc about
using a drop down with hyperlinks)

This is how I did what that poster wants and I was just asking how to change
the reference so I could answer their post and not confuse them with the
R1C1 reference. You know most people have trouble deciphering R1C1
references.

So, cell D1 is my DV drop down. The values in that list are defined names
that take me to various places on the sheet. I use a button and some of the
code assigned to that button is:

Application.Goto Reference:="INDIRECT(R1C4)"

I got this code using the macro recorder.

So if I select Week_1 from the drop down in cell D1 and then click the
button, I'm taken to the cell with the defined name of Week_1.

It works PERFECTLY as is but I just wanted to change the R1C1 reference in
that line of code to an A1 reference so as not to confuse anyone!

Biff

"Dave Peterson" wrote in message
...
Application.goto worksheets("sheet1").range("d1")

Qualify as much as you like (include the workbook, too???).



Biff wrote:

Hi Folks!

Application.Goto Reference:="INDIRECT(R1C4)"

How do I change the R1C1 reference to an A1 reference?

When I use either "D1" or D1 I get errors.

Thanks

Biff


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Change reference style in line of code

Option Explicit
Sub testme()

Dim testRng As Range
Dim myCell As Range

Set myCell = Worksheets("sheet1").Range("d1")

Set testRng = Nothing
On Error Resume Next
Set testRng = Worksheets("Sheet1").Range(myCell.Value)
On Error GoTo 0

If testRng Is Nothing Then
Beep
Else
Application.Goto testRng
End If

End Sub


Biff wrote:

Hi Dave!

I don't want to go to cell D1.

Let me explain.... (this is very similar to that other post in .Misc about
using a drop down with hyperlinks)

This is how I did what that poster wants and I was just asking how to change
the reference so I could answer their post and not confuse them with the
R1C1 reference. You know most people have trouble deciphering R1C1
references.

So, cell D1 is my DV drop down. The values in that list are defined names
that take me to various places on the sheet. I use a button and some of the
code assigned to that button is:

Application.Goto Reference:="INDIRECT(R1C4)"

I got this code using the macro recorder.

So if I select Week_1 from the drop down in cell D1 and then click the
button, I'm taken to the cell with the defined name of Week_1.

It works PERFECTLY as is but I just wanted to change the R1C1 reference in
that line of code to an A1 reference so as not to confuse anyone!

Biff

"Dave Peterson" wrote in message
...
Application.goto worksheets("sheet1").range("d1")

Qualify as much as you like (include the workbook, too???).



Biff wrote:

Hi Folks!

Application.Goto Reference:="INDIRECT(R1C4)"

How do I change the R1C1 reference to an A1 reference?

When I use either "D1" or D1 I get errors.

Thanks

Biff


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,688
Default Change reference style in line of code

That does work but it seems like a "long" way of expressing D1.

Thanks

Biff

"Dave Peterson" wrote in message
...
Option Explicit
Sub testme()

Dim testRng As Range
Dim myCell As Range

Set myCell = Worksheets("sheet1").Range("d1")

Set testRng = Nothing
On Error Resume Next
Set testRng = Worksheets("Sheet1").Range(myCell.Value)
On Error GoTo 0

If testRng Is Nothing Then
Beep
Else
Application.Goto testRng
End If

End Sub


Biff wrote:

Hi Dave!

I don't want to go to cell D1.

Let me explain.... (this is very similar to that other post in .Misc
about
using a drop down with hyperlinks)

This is how I did what that poster wants and I was just asking how to
change
the reference so I could answer their post and not confuse them with the
R1C1 reference. You know most people have trouble deciphering R1C1
references.

So, cell D1 is my DV drop down. The values in that list are defined names
that take me to various places on the sheet. I use a button and some of
the
code assigned to that button is:

Application.Goto Reference:="INDIRECT(R1C4)"

I got this code using the macro recorder.

So if I select Week_1 from the drop down in cell D1 and then click the
button, I'm taken to the cell with the defined name of Week_1.

It works PERFECTLY as is but I just wanted to change the R1C1 reference
in
that line of code to an A1 reference so as not to confuse anyone!

Biff

"Dave Peterson" wrote in message
...
Application.goto worksheets("sheet1").range("d1")

Qualify as much as you like (include the workbook, too???).



Biff wrote:

Hi Folks!

Application.Goto Reference:="INDIRECT(R1C4)"

How do I change the R1C1 reference to an A1 reference?

When I use either "D1" or D1 I get errors.

Thanks

Biff

--

Dave Peterson


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Change reference style in line of code

If you want to go to the cell listed in cell D1 then

On Error Resume Next
Application.Goto Reference:=Range(Range("D1").Value)
On Error goto 0

--
Regards,
Tom Ogilvy


"Biff" wrote in message
...
Hi Folks!

Application.Goto Reference:="INDIRECT(R1C4)"

How do I change the R1C1 reference to an A1 reference?

When I use either "D1" or D1 I get errors.

Thanks

Biff




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,688
Default Change reference style in line of code

That works and is compact at the same time!

Thank, Tom

Biff

"Tom Ogilvy" wrote in message
...
If you want to go to the cell listed in cell D1 then

On Error Resume Next
Application.Goto Reference:=Range(Range("D1").Value)
On Error goto 0

--
Regards,
Tom Ogilvy


"Biff" wrote in message
...
Hi Folks!

Application.Goto Reference:="INDIRECT(R1C4)"

How do I change the R1C1 reference to an A1 reference?

When I use either "D1" or D1 I get errors.

Thanks

Biff






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
xy plot line style change when I select "fixed maximum" flobear Charts and Charting in Excel 1 November 17th 07 01:54 PM
How do I change sheet notation from R1C1 style to A1 style in XL 2 Sherlock1506 Setting up and Configuration of Excel 1 December 5th 06 03:22 PM
can a1 reference style and r1c1 style be used in same formula? rjagga Excel Worksheet Functions 1 September 17th 06 10:58 AM
? change default line style from solid to dotted Skip Excel Discussion (Misc queries) 0 January 10th 06 01:10 PM
Change GETPIVOTDATA cell reference to A1 style Doit Excel Worksheet Functions 1 October 5th 05 03:09 PM


All times are GMT +1. The time now is 06:20 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"