# Text-to-text equals number

Solved/Closed
kriswiberg - Mar 5, 2015 at 08:19 AM
kriswiberg - Mar 17, 2015 at 04:46 AM
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 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Mar 5, 2015 at 11:25 AM
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..!?!?
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Mar 12, 2015 at 12:03 PM
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
kriswiberg > TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022
Mar 17, 2015 at 04:46 AM
Amazing! You just made my day!
Thanks a lot!!
Best regards
Kris