ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Combine 2 cells to match a predefined name? (https://www.excelbanter.com/excel-discussion-misc-queries/207422-combine-2-cells-match-predefined-name.html)

tgardiner

Combine 2 cells to match a predefined name?
 
I have different columns named 2007 (A1), 2008 (B1), 2009 (C1), etc. I have
a cell on a different sheet that I have named "Inc.2007". Is there a way to
combine "Inc."&A1 and have it return the value in the named cell?

As I do it now, I put ="Inc."&A1, and it returns the value "Inc.2007",
instead of the value that is named "Inc.2007'. Is there any way to make this
work?

Max

Combine 2 cells to match a predefined name?
 
INDIRECT will do it for you:
=INDIRECT("Inc."&A1)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,500 Files:362 Subscribers:62
xdemechanik
---
"tgardiner" wrote:
I have different columns named 2007 (A1), 2008 (B1), 2009 (C1), etc. I have
a cell on a different sheet that I have named "Inc.2007". Is there a way to
combine "Inc."&A1 and have it return the value in the named cell?

As I do it now, I put ="Inc."&A1, and it returns the value "Inc.2007",
instead of the value that is named "Inc.2007'. Is there any way to make this
work?


AKphidelt

Combine 2 cells to match a predefined name?
 
Use the indirect function

Such as

=Indirect("Inc."&A1)

"tgardiner" wrote:

I have different columns named 2007 (A1), 2008 (B1), 2009 (C1), etc. I have
a cell on a different sheet that I have named "Inc.2007". Is there a way to
combine "Inc."&A1 and have it return the value in the named cell?

As I do it now, I put ="Inc."&A1, and it returns the value "Inc.2007",
instead of the value that is named "Inc.2007'. Is there any way to make this
work?


Max

Combine 2 cells to match a predefined name?
 
Clarification
=INDIRECT("Inc."&A1)

presumes A1 will contain only: 2007

If you have the full string entered in A1, ie: Inc.2007
then just use: =INDIRECT(A1)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,500 Files:362 Subscribers:62
xdemechanik
---

Ken Johnson

Combine 2 cells to match a predefined name?
 
On Oct 23, 10:08*am, tgardiner
wrote:
I have different columns named 2007 (A1), 2008 (B1), 2009 (C1), etc. *I have
a cell on a different sheet that I have named "Inc.2007". *Is there a way to
combine "Inc."&A1 and have it return the value in the named cell?

As I do it now, I put ="Inc."&A1, and it returns the value "Inc.2007",
instead of the value that is named "Inc.2007'. *Is there any way to make this
work?


Try...

=INDIRECT("Inc."&A1)

Ken Johnson

Pete_UK

Combine 2 cells to match a predefined name?
 
If it is in the same workbook you could try this:

=INDIRECT("Inc."&A1)

You might need to put the sheet name before the Inc.

INDIRECT only works with open files.

Hope this helps.

Pete

On Oct 23, 12:08*am, tgardiner
wrote:
I have different columns named 2007 (A1), 2008 (B1), 2009 (C1), etc. *I have
a cell on a different sheet that I have named "Inc.2007". *Is there a way to
combine "Inc."&A1 and have it return the value in the named cell?

As I do it now, I put ="Inc."&A1, and it returns the value "Inc.2007",
instead of the value that is named "Inc.2007'. *Is there any way to make this
work?



tgardiner

Combine 2 cells to match a predefined name?
 
Thank you very much -- I feel stupid (but glad) that it is such an easy answer.

"Max" wrote:

INDIRECT will do it for you:
=INDIRECT("Inc."&A1)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,500 Files:362 Subscribers:62
xdemechanik
---
"tgardiner" wrote:
I have different columns named 2007 (A1), 2008 (B1), 2009 (C1), etc. I have
a cell on a different sheet that I have named "Inc.2007". Is there a way to
combine "Inc."&A1 and have it return the value in the named cell?

As I do it now, I put ="Inc."&A1, and it returns the value "Inc.2007",
instead of the value that is named "Inc.2007'. Is there any way to make this
work?


Max

Combine 2 cells to match a predefined name?
 
Thank you very much -- I feel stupid (but glad) that it is such an easy
answer.

Welcome. Ah, don't ever need to feel that way. Always ask.
There's quite a number of responders here to help you out.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,500 Files:362 Subscribers:62
xdemechanik
---




All times are GMT +1. The time now is 11:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com