Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MB MB is offline
external usenet poster
 
Posts: 53
Default How to take text from other cells to create a reference to a name

I have a number of simlar named ranges - e.g. basicsalprnaip, basicsalprtodc,
basicsalprcoco etc etc ......

I wish to create a text string within each sheet of my workbook that creates
a ref to the named range by taking the last 5 characters from the current
worksheet - e.g. prnaip in the first example above.

e.g. =basicsal&A1
(A1 cell containes prnaip)

However this does not create a formula referring to the named range. Hope
this explanation is clear!! Please help !!!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default How to take text from other cells to create a reference to a name

=INDIRECT("basicsal"&A1)


On 3 Lis, 14:18, MB wrote:
I have a number of simlar named ranges - e.g. basicsalprnaip, basicsalprtodc,
basicsalprcoco *etc etc ......

I wish to create a text string within each sheet of my workbook that creates
a ref to the named range by taking the last 5 characters from the current
worksheet - e.g. prnaip in the first example above.

e.g. =basicsal&A1
(A1 cell containes prnaip)

However this does not create a formula referring to the named range. *Hope
this explanation is clear!! *Please help !!!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default How to take text from other cells to create a reference to a name

I'm not sure I've got this right, but perhaps it'll give you enough
information to do what you want. Note that CELL() will not return a value
until the workbook has been saved to disk.

the CELL() function will give you the name of the workbook and worksheet
that a cell references is on. For example, if you put this
=CELL("filename",A1)
on Sheet1 somewhere it will give you something like
C:\Users\UserName\Documents\[WorkbookName.xls]Sheet1

so =Right(Cell("filename",A1),5) will give you the right 5 characters of
that string, presumably the last 5 characters of the sheet name.

INDIRECT() uses the parameter as the address to return information from, so
=INDIRECT(RIGHT(CELL("filename",A1),5))
would return the value from a range named "heet1" in my example.

Take it one more step and
=INDIRECT("basicsal" & RIGHT(CELL("filename",A1),5))
would return the value from a range named 'basicsalheet1'.

Hope this helps.



"MB" wrote:

I have a number of simlar named ranges - e.g. basicsalprnaip, basicsalprtodc,
basicsalprcoco etc etc ......

I wish to create a text string within each sheet of my workbook that creates
a ref to the named range by taking the last 5 characters from the current
worksheet - e.g. prnaip in the first example above.

e.g. =basicsal&A1
(A1 cell containes prnaip)

However this does not create a formula referring to the named range. Hope
this explanation is clear!! Please help !!!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to take text from other cells to create a reference to a name

Try:
=indirect("basicsal"&a1)


MB wrote:

I have a number of simlar named ranges - e.g. basicsalprnaip, basicsalprtodc,
basicsalprcoco etc etc ......

I wish to create a text string within each sheet of my workbook that creates
a ref to the named range by taking the last 5 characters from the current
worksheet - e.g. prnaip in the first example above.

e.g. =basicsal&A1
(A1 cell containes prnaip)

However this does not create a formula referring to the named range. Hope
this explanation is clear!! Please help !!!


--

Dave Peterson
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
In Excel trying to reference text that already is in other cells? BillR Excel Worksheet Functions 5 October 30th 07 07:59 PM
Can I create a formula from text in several cells? bmac Excel Worksheet Functions 3 May 12th 05 05:59 PM
how do i reference cells to create a chart? Nick M Charts and Charting in Excel 1 December 15th 04 03:50 AM
Using the results from two seperate cells to create cell reference DarrenWood Excel Worksheet Functions 2 November 14th 04 10:35 PM
Using the results from two seperate cells to create cell reference DarrenWood Excel Worksheet Functions 0 November 14th 04 10:20 PM


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