How to display sum of two cells but only if another cell has a number greater than 0.1

Tristram_ZX81

New Member
Joined
Jun 22, 2021
Messages
19
Office Version
  1. 365
Platform
  1. Windows
I want cell C4 to display A4:B4, but only if the value of A4 or B4 is equal to or greater than 0.2. But I also need C4 to equal 0.1 if either A4 or B4 has a value of 0.1. (Due to the way the formula is designed in A4 and B4, they will never display 0.1 and any other number). I thought the below formula might work, but it doesn't. Any ideas?

=IF(ISNUMBER(SEARCH(0.1,A4)),0.1,IF(ISNUMBER(SEARCH(0.1,B4)),0.1,IF(ISNUMBER(SEARCH(">=0.2",A4)),A4:B4,IF(ISNUMBER(SEARCH(">=0.2",B4)),A4:B4))))
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Tristram_ZX81

New Member
Joined
Jun 22, 2021
Messages
19
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

That formula worked for C4, bit when I tried to drag the formula down to the rows below it's returning an #VALUE! on any row where the number in column A or B isn't 0.1 I need it to give me the sum of A:B if either cell is 0.2 or higher. Any ideas?

1624548887735.png
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
11,391
Try changing it to:


Excel Formula:
=IF(OR(A4=0.1,B4=0.1),0.1,IF(OR(A4>=0.2,B4>=0.2),SUM(A4:B4),""))

Rows 10-13 still puzzle me though. I don't see why those are giving #VALUE errors. What is the formula in A10 and B10?
 

Tristram_ZX81

New Member
Joined
Jun 22, 2021
Messages
19
Office Version
  1. 365
Platform
  1. Windows
It works. You are my spirit animal, Eric. Thanks again.

In the original doc after your first response, A10 was

=IF(OR(A10=0.1,B10=0.1),0.1,IF(OR(A10>=0.2,B10>=0.2),A10+B10,""))
 

Forum statistics

Threads
1,141,058
Messages
5,704,032
Members
421,323
Latest member
Exidous

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