ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Cell variable in formula (https://www.excelbanter.com/excel-worksheet-functions/115186-cell-variable-formula.html)

Tim desision support

Cell variable in formula
 
Can I use a cell value as a variable in a formula to bring in a cell content


Cell value Cell Content Desired output
A1=5 B5=house C1=house
A2=10 B10=car C2=car
A3=15 B15=truck C3=truck
A4=20 B20=9 C4=9

I tried as a formula in cell C1 =A(b5) but it didn't work, is
there some formula that I can use if I have 500 rows of data without typing
in the actual formula in cell C1



vezerid

Cell variable in formula
 
In C1:
=INDIRECT("B"&A1)

HTH
Kostis Vezerides



Tim desision support wrote:
Can I use a cell value as a variable in a formula to bring in a cell content


Cell value Cell Content Desired output
A1=5 B5=house C1=house
A2=10 B10=car C2=car
A3=15 B15=truck C3=truck
A4=20 B20=9 C4=9

I tried as a formula in cell C1 =A(b5) but it didn't work, is
there some formula that I can use if I have 500 rows of data without typing
in the actual formula in cell C1




All times are GMT +1. The time now is 04:10 PM.

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