Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old August 29th 05, 06:09 PM
XLDabbler
 
Posts: n/a
Default Concatenating cell values to create sheet names

I would like to concatenate cell values to create a name that corresponds to
a worksheet name and then use that in a formula. Does anyone know how to do
this?

  #2   Report Post  
Old August 29th 05, 07:06 PM
Dave Peterson
 
Posts: n/a
Default

You can use:

=a1&a2
to concatenate a couple of cells.

To refer to that in another formula, you'd need something like:

=indirect("'" & a1&a2 &"'!A1")

or if there's a chance your concatenated string refers to a non-existing
worksheet and you want to avoid a #ref! error, you can check first:

=IF(ISERROR(CELL("address",INDIRECT("'"&A1&A2&"'!a 1"))),"missing",
INDIRECT("'"&A1&A2&"'!a1"))

(all one cell)



XLDabbler wrote:

I would like to concatenate cell values to create a name that corresponds to
a worksheet name and then use that in a formula. Does anyone know how to do
this?


--

Dave Peterson
  #3   Report Post  
Old August 29th 05, 09:47 PM
Mike
 
Posts: n/a
Default

sample:
=Sheet2!B4

So in general
WORKSHEETNAME!CELL
would work in formulas.

"XLDabbler" wrote:

I would like to concatenate cell values to create a name that corresponds to
a worksheet name and then use that in a formula. Does anyone know how to do
this?

  #4   Report Post  
Old August 29th 05, 09:55 PM
XLDabbler
 
Posts: n/a
Default

Thank you, Dave! That was exactly what I needed!

"Dave Peterson" wrote:

You can use:

=a1&a2
to concatenate a couple of cells.

To refer to that in another formula, you'd need something like:

=indirect("'" & a1&a2 &"'!A1")

or if there's a chance your concatenated string refers to a non-existing
worksheet and you want to avoid a #ref! error, you can check first:

=IF(ISERROR(CELL("address",INDIRECT("'"&A1&A2&"'!a 1"))),"missing",
INDIRECT("'"&A1&A2&"'!a1"))

(all one cell)



XLDabbler wrote:

I would like to concatenate cell values to create a name that corresponds to
a worksheet name and then use that in a formula. Does anyone know how to do
this?


--

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
Get other sheet names into a column Keyser Excel Worksheet Functions 2 August 27th 05 02:02 AM
Excell:Move from any Cell Sheet 1 to any cell Sheet 2 etc. eldo Excel Worksheet Functions 1 August 16th 05 09:17 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
how to create a variable column in cell reference Sampson Excel Worksheet Functions 3 February 21st 05 10:13 PM
Copy text from same cell on every sheet to title sheet? Jon Excel Discussion (Misc queries) 2 February 9th 05 03:11 PM


All times are GMT +1. The time now is 04:21 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017