Text-to-text equals number

[Solved/Closed]
Report
-
 kriswiberg -
Hi..

I'm looking for a solution for a dilemma I'm in..
On sheet 1 I have a dropdown box in cell A1 and B1 is an emtpy cell.
On sheet 2 I have the same dropdown box in A1 followed by a cell in B1 which I can type hours, for example "2".
Is there a way to tell Excel, that if the same word is active in the dropdown menu, it will transfer the number "2" to the empty cell on sheet 1, B1..??
Thanks..

1 reply

Posts
2818
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 18, 2021
486
Hi Kriswiberg,

Try the following formula in sheet1 cell B1:
=IF(A1=Sheet2!A1,Sheet2!B1,"")

Best regards,
Trowa
Weeee!!! Solved it!!
You were on the right track. I got an error message, but kept to your formula and ended up with this =IF(A1='Sheet2'!A1;'Sheet2'!B1;0)
That makes it count zero until the cells match :-D Thanks a lot!!!
New question..
How can I expand this formula, so that for example, if I have another dropdown box on sheet2, A2, and I want excel to say that Sheet1, A1 should be equal with Sheet2, A1 OR Sheet2, A2..!?!?
Posts
2818
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 18, 2021
486
Hi Kriswiberg,

Depending on your language you will have to use either , or ; as separator.

Your new formula would look like:
=IF(OR(A1=Sheet2!A1;A1=Sheet2!A2);Sheet2!B1;0)

Best regards,
Trowa
>
Posts
2818
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 18, 2021

Amazing! You just made my day!
Thanks a lot!!
Best regards
Kris