Thread: Need formula Thanks: 0 Likes:  1 Post #5115371 (1)

1. Need formula

Hi everyone!

If A1 has the text "Cement" then it should calculate and produce result in A5 like this (A2/105*100). A2 will have some numerical value. If A1 does not have Cement then A5 should show 0.

Please advise and provide a formula for the above request.  Reply With Quote

2. Re: Need formula

Below formula will go in A5

=IF(A1<>"Cement",0,(A2/105*100))  Reply With Quote

3. Re: Need formula

It gives 0 as answer, even if A1 has cement.  Reply With Quote

4. Re: Need formula

Try:
Code:
=(A1="Cement")*(A2/105*100)  Reply With Quote

5. Re: Need formula

Used the formula =(A1="Cement")*(A2/105*100) in A5. It is still the same, answer is 0.  Reply With Quote

6. Re: Need formula

When I put Cement into A1 and 3 into A2, with the suggested formula, I got 2.857143 in A5
When I deleted A1, then I get 0 in A5
I'm using Excel 2016

Try:
Code:
=--(A1="Cement")*(A2/105*100)  Reply With Quote

7. Re: Need formula

=IF(A1="cement", (A2/105*100),"0") will work as long as you have some data in A2 otherwise it will show 0.  Reply With Quote

8. Re: Need formula

This works fine. Thanks, Ryan.  Reply With Quote

9. Re: Need formula

Arunachalam, Ryan confirmed my suggested formula works, as long as A2 is not blank and I suggested adding -- to it if what originally suggested didn't work.

What do you have working now and is it because A2 is not blank?  Reply With Quote

User Tag List

Tags for this Thread

cement, formula, numerical, provide, show  Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•