View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default Use cell content (example: ="a") in formula.

R0nald wrote:

How can I use the content of a cell as rule in a formula?

Exammple:

A2 has a
A3 has b
a4 has c
etc, etc.

Content of B1 is (as text): ="a"

I want to have a formula in b2 where the content of B2 is used to compare
if A2 is ="a" (the content of B2)
So something like:
=IF(A2 & B1 & ;1;2)

it will have the same effect as =IF(A2="a";1;2) where the comparision with
"a" is hardcoded.


So, something like this?

=IF(A2=B2,1,2)

--
Sometimes you wake up.
Sometimes the fall kills you.
And sometimes, when you fall, you fly.