ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Changing a cell reference within a formula w/another cell (https://www.excelbanter.com/excel-worksheet-functions/75630-changing-cell-reference-within-formula-w-another-cell.html)

tx12345

Changing a cell reference within a formula w/another cell
 

Hi

Let's say I have this formula in A1:

=if(A2=2,"Hello","")

But let's say I want to make the location of where the '2' has to be to
trigger the 'Hello' in A1 conditioned on a value in B1, and let's say B1
changes to 5. So now instead of the formula in A1 saying
=if(A2=2,"Hello","") I will want it to say =if(A5=2,"Hello","").

Many thanks as always

tx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=519578


davesexcel

Changing a cell reference within a formula w/another cell
 

I am confused, are you asking for 2 formulas in one cell, this can be
done I just want to be sure that is what you are asking:
for example
=if(A2=2,"Hello",if(A5=2,"Hello",""))
Is this what you mean??


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=519578


CLR

Changing a cell reference within a formula w/another cell
 
=IF(INDIRECT("A"&B1)=2,"Hello","")

Vaya con Dios,
Chuck, CABGx3


"tx12345" wrote in
message ...

Hi

Let's say I have this formula in A1:

=if(A2=2,"Hello","")

But let's say I want to make the location of where the '2' has to be to
trigger the 'Hello' in A1 conditioned on a value in B1, and let's say B1
changes to 5. So now instead of the formula in A1 saying
=if(A2=2,"Hello","") I will want it to say =if(A5=2,"Hello","").

Many thanks as always

tx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile:

http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=519578




Max

Changing a cell reference within a formula w/another cell
 
One way, think we could use in A1:
=IF(INDIRECT("A"&B1)=2,"Hello","")
where B1 will contain the row reference
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"tx12345" wrote in
message ...

Hi

Let's say I have this formula in A1:

=if(A2=2,"Hello","")

But let's say I want to make the location of where the '2' has to be to
trigger the 'Hello' in A1 conditioned on a value in B1, and let's say B1
changes to 5. So now instead of the formula in A1 saying
=if(A2=2,"Hello","") I will want it to say =if(A5=2,"Hello","").

Many thanks as always

tx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile:

http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=519578




tx12345

Changing a cell reference within a formula w/another cell
 

CLR

Works great, thank you.

tx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=519578


CLR

Changing a cell reference within a formula w/another cell
 
You're quite welcome, thanks for the feedback......

Vaya con Dios,
Chuck, CABGx3


"tx12345" wrote in
message ...

CLR

Works great, thank you.

tx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile:

http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=519578





All times are GMT +1. The time now is 05:39 PM.

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