Need formula

Arunachalam1983

New Member
Joined
Jul 31, 2018
Messages
4
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.
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,674
Office Version
365
Platform
Windows
Try:
Code:
=(A1="Cement")*(A2/105*100)
 

Arunachalam1983

New Member
Joined
Jul 31, 2018
Messages
4
Used the formula =(A1="Cement")*(A2/105*100) in A5. It is still the same, answer is 0.
 

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,674
Office Version
365
Platform
Windows
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)
 

Ryan1996

Board Regular
Joined
Jun 4, 2018
Messages
55
=IF(A1="cement", (A2/105*100),"0") will work as long as you have some data in A2 otherwise it will show 0.
 

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,674
Office Version
365
Platform
Windows
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?
 

Watch MrExcel Video

Forum statistics

Threads
1,102,099
Messages
5,484,656
Members
407,459
Latest member
DICKSON KIMEMIA

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top