Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Creating absolute references including active sheet name in the formula

Hi,

If you have cells with absolute formulas - how do you make them to add the
active worksheet into the formula as well?

I needed this because in code I move the formulas in the first sheet to
cells in another second sheet and still want to have the right reference
formula.

- OK, I need it to add a sheet reference to the first sheet. If one rng in
sheet1 have "=$A$4" I need it to be "Sheet1!$A$4" in sheet3.

Sometimes the rng contain a reference to another third sheet and it work
fine, we still get the reference to the right sheetname( Sheet3!A4" will be
Sheet3!$A$4" ).

BUT with this code when the reference is pointing within the first sheet
("=A4") , it will start pointing to the reference cells in the second sheet
"=$A$4"! , when it should be Sheet1!$A$4"

Can anybody help me with that? With code add the activesheet in front?


/Regards


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Creating absolute references including active sheet name in the formula

=INDIRECT("Sheet1!$A$4")

perhaps

--
HTH

Bob Phillips

"Maria J-son" wrote in message
...
Hi,

If you have cells with absolute formulas - how do you make them to add the
active worksheet into the formula as well?

I needed this because in code I move the formulas in the first sheet to
cells in another second sheet and still want to have the right reference
formula.

- OK, I need it to add a sheet reference to the first sheet. If one rng

in
sheet1 have "=$A$4" I need it to be "Sheet1!$A$4" in sheet3.

Sometimes the rng contain a reference to another third sheet and it work
fine, we still get the reference to the right sheetname( Sheet3!A4" will

be
Sheet3!$A$4" ).

BUT with this code when the reference is pointing within the first sheet
("=A4") , it will start pointing to the reference cells in the second

sheet
"=$A$4"! , when it should be Sheet1!$A$4"

Can anybody help me with that? With code add the activesheet in front?


/Regards




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Creating absolute references including active sheet name in the formula

Hi Bob,
Do you know if there is a similar function in vba for ranges, address etc?
Regards


"Bob Phillips" skrev i meddelandet
...
=INDIRECT("Sheet1!$A$4")

perhaps

--
HTH

Bob Phillips

"Maria J-son" wrote in message
...
Hi,

If you have cells with absolute formulas - how do you make them to add
the
active worksheet into the formula as well?

I needed this because in code I move the formulas in the first sheet to
cells in another second sheet and still want to have the right reference
formula.

- OK, I need it to add a sheet reference to the first sheet. If one rng

in
sheet1 have "=$A$4" I need it to be "Sheet1!$A$4" in sheet3.

Sometimes the rng contain a reference to another third sheet and it work
fine, we still get the reference to the right sheetname( Sheet3!A4" will

be
Sheet3!$A$4" ).

BUT with this code when the reference is pointing within the first sheet
("=A4") , it will start pointing to the reference cells in the second

sheet
"=$A$4"! , when it should be Sheet1!$A$4"

Can anybody help me with that? With code add the activesheet in front?


/Regards






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Creating absolute references including active sheet name in the formula

Can you give me an example of what you mean?

--
HTH

Bob Phillips

"Maria J-son" wrote in message
...
Hi Bob,
Do you know if there is a similar function in vba for ranges, address etc?
Regards


"Bob Phillips" skrev i meddelandet
...
=INDIRECT("Sheet1!$A$4")

perhaps

--
HTH

Bob Phillips

"Maria J-son" wrote in message
...
Hi,

If you have cells with absolute formulas - how do you make them to add
the
active worksheet into the formula as well?

I needed this because in code I move the formulas in the first sheet

to
cells in another second sheet and still want to have the right

reference
formula.

- OK, I need it to add a sheet reference to the first sheet. If one

rng
in
sheet1 have "=$A$4" I need it to be "Sheet1!$A$4" in sheet3.

Sometimes the rng contain a reference to another third sheet and it

work
fine, we still get the reference to the right sheetname( Sheet3!A4"

will
be
Sheet3!$A$4" ).

BUT with this code when the reference is pointing within the first

sheet
("=A4") , it will start pointing to the reference cells in the second

sheet
"=$A$4"! , when it should be Sheet1!$A$4"

Can anybody help me with that? With code add the activesheet in front?


/Regards








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Creating absolute references including active sheet name in the formula

Hi,
I started a new thread with a better explanation/examples of the problem.
I'd be grateful if you can help.
/Regards


"Bob Phillips" skrev i meddelandet
...
Can you give me an example of what you mean?

--
HTH

Bob Phillips

"Maria J-son" wrote in message
...
Hi Bob,
Do you know if there is a similar function in vba for ranges, address
etc?
Regards


"Bob Phillips" skrev i meddelandet
...
=INDIRECT("Sheet1!$A$4")

perhaps

--
HTH

Bob Phillips

"Maria J-son" wrote in message
...
Hi,

If you have cells with absolute formulas - how do you make them to add
the
active worksheet into the formula as well?

I needed this because in code I move the formulas in the first sheet

to
cells in another second sheet and still want to have the right

reference
formula.

- OK, I need it to add a sheet reference to the first sheet. If one

rng
in
sheet1 have "=$A$4" I need it to be "Sheet1!$A$4" in sheet3.

Sometimes the rng contain a reference to another third sheet and it

work
fine, we still get the reference to the right sheetname( Sheet3!A4"

will
be
Sheet3!$A$4" ).

BUT with this code when the reference is pointing within the first

sheet
("=A4") , it will start pointing to the reference cells in the second
sheet
"=$A$4"! , when it should be Sheet1!$A$4"

Can anybody help me with that? With code add the activesheet in front?


/Regards










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
How do I write a formula with absolute cell references deb44 New Users to Excel 6 April 1st 23 09:38 PM
Convert selected formula references from relative to absolute M Excel Discussion (Misc queries) 6 March 24th 10 01:09 AM
Help with converting a block of cells with Absolute and mixed references to relative references Vulcan Excel Worksheet Functions 3 December 13th 07 11:43 PM
Creating sheet references Mats Samson Excel Worksheet Functions 4 September 28th 07 04:37 PM
Absolute References in cell formula ah666 Excel Worksheet Functions 5 June 17th 05 03:40 PM


All times are GMT +1. The time now is 05:13 PM.

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"