Converting Formula Yes No 0 1

Mstg007

Active Member
Joined
Dec 30, 2013
Messages
383
.
I am trying to combine the first formula with the one below. The It will read from the index a yes or no, and I want the yes or no to be converted to 0 and or 1.
Thanks for any help!
Code:
=(INDEX('Sheet2'!$AS$20:$AS$100,MATCH($BK20,'Sheet2'!$A$20:$A$100,0)))

Code:
=if(A1=0,"NO",if(a1=1,"YES",""))
 
my head my be hurting... here is the original formula you gave that works...
Code:
=(INDEX('Sheet2'!$AS$20:$AS$100,MATCH($BK20,'Sheet2'!$A$20:$A$100,0))="No")+4
not quite sure
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
my head my be hurting... here is the original formula you gave that works...
Code:
=(INDEX('Sheet2'!$AS$20:$AS$100,MATCH($BK20,'Sheet2'!$A$20:$A$100,0))="No")+4
not quite sure

Just wondering if you saw my suggestion in Message #9... as long as there are only three choices, it seems implementing it would simplify things greatly for you.
 
Upvote 0
.=MATCH(index,{"R","Yes","No"},0)+2
Code:
=MATCH(INDEX('Rational Method Storm Sewer'!$AS$20:$AS$100,MATCH($BK20,'Rational Method Storm Sewer'!$A
$20:$A$100,0)),{"R","Yes","No"},0)+2


=CHOOSE(A1-2,"R","Yes","No")
Code:
=CHOOSE(MATCH('Sheet2'!$AS$20:$AS$100,MATCH($BK20,'Sheet2'!$A$20:$A$100,0)),(A1-2,"R","Yes","No")
 
Upvote 0
Can I get this to reverse? [=3]"R";[=4]"Yes";"No"
No, the format only works with numbers... but I am wondering why you would need to. The idea behind my suggestion was that you would do all your Excel work using the same numbers as the other program you mentioned that only worked with the number, but just using the Custom Format that I suggested to show the numbers to you as the letter/words you wanted to see.
 
Upvote 0
Because the way we use values from the program then reimport back into our spreadsheet to give our final results. I hope that clears that up.
 
Upvote 0
Because the way we use values from the program then reimport back into our spreadsheet to give our final results. I hope that clears that up.
In that case, I do not think you will be able to effectively use what I had suggested... go with what Jonmo1 has been suggesting to you.
 
Upvote 0
To reverse it
=CHOOSE(A1-2,"R","Yes","No")
A1 is the cell holding the 3 4 or 5

No "real" saving here, I guess, but you can eliminate Excel from having to do the subtraction (A1-2) by just putting in place-holder commas for index 1 and 2...

=CHOOSE(A1,,,"R","Yes","No")
 
Upvote 0

Forum statistics

Threads
1,215,440
Messages
6,124,882
Members
449,193
Latest member
PurplePlop

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top