Spreadsheet formula

sdc83

New Member
Joined
Nov 26, 2020
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi everyone struggling to make a formula work and would really appreciate some help. Below is what I need to do.

If cell A3 = “load” I need cell I3 to perform sum (I2+F3)
If cell A3 = “discharge” I need cell I3 to perform sum (I2-H3)
If cell A3 = “Clean” in need cell I3 to show Clean

I’m having trouble making all three work together in the same cell.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Sufiyan97

Well-known Member
Joined
Apr 12, 2019
Messages
539
Office Version
  1. 2013
Platform
  1. Windows
Hi everyone struggling to make a formula work and would really appreciate some help. Below is what I need to do.

If cell A3 = “load” I need cell I3 to perform sum (I2+F3)
If cell A3 = “discharge” I need cell I3 to perform sum (I2-H3)
If cell A3 = “Clean” in need cell I3 to show Clean

I’m having trouble making all three work together in the same cell.
Try

Book1
ABCDEFGHI
1
21
3clean21Clean
4
5
Sheet1
Cell Formulas
RangeFormula
I3I3=IF(A3="Load",I2+F3,IF(A3="Discharge",I2-H3,IF(A3="Clean","Clean","")))
 

KevCarter

Board Regular
Joined
Dec 7, 2013
Messages
147
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Untested

Please try:

Excel Formula:
= IFS(A3="","", A3 = “load” , I2+F3 , A3 = “discharge” , I2-H3 , A3 = “Clean” , "Clean")
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
66,040
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=IF(A3="Clean",A3,IF(A3="load",I2+F3,IF(A3="discharge",I2-H3,"??")))
 

Sufiyan97

Well-known Member
Joined
Apr 12, 2019
Messages
539
Office Version
  1. 2013
Platform
  1. Windows

ADVERTISEMENT

sdc83

Ignore my formula and use Fluff's formula​

 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
66,040
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

Forum statistics

Threads
1,148,333
Messages
5,746,145
Members
423,994
Latest member
blzxatly

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
Top