• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need Microsoft Excel Help

MorphineChild

Senior member
I am sure I am missing something stupid but here goes:

I want to make an statement that if a cell = B than it returns a 1 and if the cell equals G than the cell returns a 0. I wrote the if statement to work kind of the opposite of this, but it will not use letters to go to numbers, anyone know what I am doing wrong? Here is what I have written that does not work.

=IF(D8=B, 1, IF(D8=G, 0))



Edit: Easy fix, I needed to put quotes around the "B" and "G"... I knew it was something stupid
 
Originally posted by: MorphineChild
I am sure I am missing something stupid but here goes:

I want to make an statement that if a cell = B than it returns a 1 and if the cell equals G than the cell returns a 0. I wrote the if statement to work kind of the opposite of this, but it will not use letters to go to numbers, anyone know what I am doing wrong? Here is what I have written that does not work.

=IF(D8=B, 1, IF(D8=G, 0))

You missed a ')' there 😉.

=IF(D8=B, 1), IF(D8=G, 0)

That should work properly.
 
Nope that still does not work, it returns #NAME, same as the original text. I do not thing an IF statement will work???

Originally posted by: Vegitto
Originally posted by: MorphineChild
I am sure I am missing something stupid but here goes:

I want to make an statement that if a cell = B than it returns a 1 and if the cell equals G than the cell returns a 0. I wrote the if statement to work kind of the opposite of this, but it will not use letters to go to numbers, anyone know what I am doing wrong? Here is what I have written that does not work.

=IF(D8=B, 1, IF(D8=G, 0))

You missed a ')' there 😉.

=IF(D8=B, 1), IF(D8=G, 0)

That should work properly.

 
Originally posted by: MorphineChild
Nope that still does not work, it returns #NAME, same as the original text. I do not thing an IF statement will work???

Originally posted by: Vegitto
Originally posted by: MorphineChild
I am sure I am missing something stupid but here goes:

I want to make an statement that if a cell = B than it returns a 1 and if the cell equals G than the cell returns a 0. I wrote the if statement to work kind of the opposite of this, but it will not use letters to go to numbers, anyone know what I am doing wrong? Here is what I have written that does not work.

=IF(D8=B, 1, IF(D8=G, 0))

You missed a ')' there 😉.

=IF(D8=B, 1), IF(D8=G, 0)

That should work properly.

If I'm not mistaking, Excel knows IFs and WHENs. Try a WHEN.

=WHEN(D8=B, 1), WHEN(D8=G, 0)
 
As mentioned, you might look into either of the LOOKUP functions, though the nested IF function method does work.
Originally posted by: Vegitto
If I'm not mistaking, Excel knows IFs and WHENs. Try a WHEN.

=WHEN(D8=B, 1), WHEN(D8=G, 0)
You're mistaken.
 
Back
Top