How to add a value to a cell if the other cell has text

Closed
jormis Posts 2 Registration date Wednesday 6 November 2013 Status Member Last seen 7 November 2013 - 6 Nov 2013 à 11:25
 Blocked Profile - 7 Nov 2013 à 14:27
Hi,

i am not able to find how to do the following formula in excel.

what is the exact formula for: "if the value of the cell A2 is text then the value in B2 is 4".

how to do this? text in the cell could be "jave".

thank you
Related:

5 responses

Blocked Profile
6 Nov 2013 à 11:51
Good Morning,

the logic statement for EXCEL is in this format:
=if(logic test, true, false)

so your formula would be like:
=if(A2="sometext",4,0)

The above would be in cell B2. Be certain to replace "sometext" with your text. I understand it will be jave.

You can nest if statements, also.

Have fun!

//ark
-Contributor
jormis Posts 2 Registration date Wednesday 6 November 2013 Status Member Last seen 7 November 2013
7 Nov 2013 à 02:37
i am trying with copy paste the formula in my excel.

i am replacing sometext with my word but it is not working.
Blocked Profile
7 Nov 2013 à 14:05
jormis,

What cell are you pasting it in? I just cut and pasted it into my sheet, and it worked. :(
If the text is in A2 i am pasting in B2.
Blocked Profile
7 Nov 2013 à 14:27
Ok, good. So try to paste it into the formula bar, and not the cell directly. :)