ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do I convert text string into a cell reference (https://www.excelbanter.com/excel-discussion-misc-queries/36439-how-do-i-convert-text-string-into-cell-reference.html)

Dave Davis

how do I convert text string into a cell reference
 
I have a spreadsheet with multiple pages (a summary sheet, plus multiple
single sheets with common format data for different products). In the summary
sheet, I want to keep the cell reference the same, but change the page
reference according to the column that the data is in. That way I can change
a cell at the top of the column to pull up the right data. I can create the
cell reference OK in text form using Concatenate , but cannot see how to
convert the resultant text string to get back to the real data. Any ideas ??

ExcelBanter AI

Answer: how do I convert text string into a cell reference
 
To convert a text string into a cell reference in Excel:
  1. Create the text string that represents the cell reference using the CONCATENATE function or the & operator.
    Example: =CONCATENATE("Sheet1!", "A1") or ="Sheet1!A1"
  2. Use the INDIRECT function to convert the text string to a cell reference.
    Example: =INDIRECT(B1)

In your case, use the CONCATENATE function to create the text string that represents the cell reference you want to convert, and then use the INDIRECT function to convert it to a cell reference. You can then use this cell reference in your formulas to pull data from the appropriate sheet.

Debra Dalgleish

You can use the Indirect function to return a reference. For example, if
cell C1 contains a sheet name, the following formula will return the
value in cell D5 on that sheet:

=INDIRECT("'"&C1&"'!D5")

Dave Davis wrote:
I have a spreadsheet with multiple pages (a summary sheet, plus multiple
single sheets with common format data for different products). In the summary
sheet, I want to keep the cell reference the same, but change the page
reference according to the column that the data is in. That way I can change
a cell at the top of the column to pull up the right data. I can create the
cell reference OK in text form using Concatenate , but cannot see how to
convert the resultant text string to get back to the real data. Any ideas ??



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Dave Davis

Many Thanks Debra, this works well. I had tried INDIRECT but obviously could
not quite get the syntax right. Thanks for your help,

"Debra Dalgleish" wrote:

You can use the Indirect function to return a reference. For example, if
cell C1 contains a sheet name, the following formula will return the
value in cell D5 on that sheet:

=INDIRECT("'"&C1&"'!D5")

Dave Davis wrote:
I have a spreadsheet with multiple pages (a summary sheet, plus multiple
single sheets with common format data for different products). In the summary
sheet, I want to keep the cell reference the same, but change the page
reference according to the column that the data is in. That way I can change
a cell at the top of the column to pull up the right data. I can create the
cell reference OK in text form using Concatenate , but cannot see how to
convert the resultant text string to get back to the real data. Any ideas ??



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



CM

how do I convert text string into a cell reference
 
Debra,
I think I need similar help. Don't know anything about excel when it comes
to these formulas. I want to take text on one worksheet and cell reference it
on another worksheet in the same workbook. is it this =indirect formula?
thanks,
Claire

"Debra Dalgleish" wrote:

You can use the Indirect function to return a reference. For example, if
cell C1 contains a sheet name, the following formula will return the
value in cell D5 on that sheet:

=INDIRECT("'"&C1&"'!D5")

Dave Davis wrote:
I have a spreadsheet with multiple pages (a summary sheet, plus multiple
single sheets with common format data for different products). In the summary
sheet, I want to keep the cell reference the same, but change the page
reference according to the column that the data is in. That way I can change
a cell at the top of the column to pull up the right data. I can create the
cell reference OK in text form using Concatenate , but cannot see how to
convert the resultant text string to get back to the real data. Any ideas ??



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html




All times are GMT +1. The time now is 12:46 PM.

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