How to get the positive value only from different excel sheets

cursor_type

New Member
Joined
Aug 23, 2022
Messages
4
Office Version
  1. 2013
Platform
  1. Windows
How can I get the positive value only. For example Sheet 1 has a positive number (e.g. 2) and Sheet 2 has a negative number (e.g. -5) then I would like the positive number (2) to be in my Sheet 3.
 

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".
Let's say, assuming the target range is A1 cell for each sheet.
The formula in A1 Sheet3 would be like this.
Excel Formula:
=IF(Sheet1!A1>Sheet2!A1,Sheet1!A1,Sheet2!A1)

Is one number always positive and one number always negative?
If not, I believe that there are some patterns as follows.

Pattern1:Sheet 1 has a positive number and Sheet 2 has a negative number.
The positive number to be in Sheet 3.

Pattern2:Sheet 1 has a positive number and Sheet 2 has a positive number.
Which positive number should be placed in Sheet 3?

Pattern3:Sheet 1 has a negative number and Sheet 2 has a negative number.
No number to be placed in Sheet 3. (Correct?)
 
Upvote 0
Let's say, assuming the target range is A1 cell for each sheet.
The formula in A1 Sheet3 would be like this.
Excel Formula:
=IF(Sheet1!A1>Sheet2!A1,Sheet1!A1,Sheet2!A1)

Is one number always positive and one number always negative?
If not, I believe that there are some patterns as follows.

Pattern1:Sheet 1 has a positive number and Sheet 2 has a negative number.
The positive number to be in Sheet 3.

Pattern2:Sheet 1 has a positive number and Sheet 2 has a positive number.
Which positive number should be placed in Sheet 3?

Pattern3:Sheet 1 has a negative number and Sheet 2 has a negative number.
No number to be placed in Sheet 3. (Correct?)
Pattern 1: Yes. And also the other way around. If Sheet 1 has a negative number and Sheet 2 has a positive. The positive number to be in Sheet 3. Is that possible?

Pattern 2: If both sheet has positive number I want the sum of both positive number.

Pattern 3: Correct.
 
Upvote 0
If there are multiple conditions, it is easier to create a formula for each condition and combine them at the end. (In the following sample, the negative case includes 0 .)
Once you are familiar with Excel, try to come up with short, efficient formulas.

Excel Formula:
=IF(AND(Sheet1!A1<=0,Sheet2!A1<=0),"",IF(AND(Sheet1!A1>0,Sheet2!A1>0),SUM(Sheet1!A1,Sheet2!A1),IF(Sheet1!A1>Sheet2!A1,Sheet1!A1,Sheet2!A1)))

Book2
ABCD
11
2
3PatternsFormulaResults
4Patern#1Sheet 1 has a positive number and Sheet 2 has a negative number. And also the other way around.1The positive number
5Patern#2Sheet 1 has a positive number and Sheet 2 has a positive number.FALSESum
6Patern#3Sheet 1 has a negative number and Sheet 2 has a negative number.FALSEEmpty
Sheet3
Cell Formulas
RangeFormula
A1A1=IF(AND(Sheet1!A1<=0,Sheet2!A1<=0),"",IF(AND(Sheet1!A1>0,Sheet2!A1>0),SUM(Sheet1!A1,Sheet2!A1),IF(Sheet1!A1>Sheet2!A1,Sheet1!A1,Sheet2!A1)))
C4C4=IF(Sheet1!A1>Sheet2!A1,Sheet1!A1,Sheet2!A1)
C5C5=IF(AND(Sheet1!A1>0,Sheet2!A1>0),SUM(Sheet1!A1,Sheet2!A1))
C6C6=IF(AND(Sheet1!A1<=0,Sheet2!A1<=0),"")
 
Upvote 0
Solution
If there are multiple conditions, it is easier to create a formula for each condition and combine them at the end. (In the following sample, the negative case includes 0 .)
Once you are familiar with Excel, try to come up with short, efficient formulas.

Excel Formula:
=IF(AND(Sheet1!A1<=0,Sheet2!A1<=0),"",IF(AND(Sheet1!A1>0,Sheet2!A1>0),SUM(Sheet1!A1,Sheet2!A1),IF(Sheet1!A1>Sheet2!A1,Sheet1!A1,Sheet2!A1)))

Book2
ABCD
11
2
3PatternsFormulaResults
4Patern#1Sheet 1 has a positive number and Sheet 2 has a negative number. And also the other way around.1The positive number
5Patern#2Sheet 1 has a positive number and Sheet 2 has a positive number.FALSESum
6Patern#3Sheet 1 has a negative number and Sheet 2 has a negative number.FALSEEmpty
Sheet3
Cell Formulas
RangeFormula
A1A1=IF(AND(Sheet1!A1<=0,Sheet2!A1<=0),"",IF(AND(Sheet1!A1>0,Sheet2!A1>0),SUM(Sheet1!A1,Sheet2!A1),IF(Sheet1!A1>Sheet2!A1,Sheet1!A1,Sheet2!A1)))
C4C4=IF(Sheet1!A1>Sheet2!A1,Sheet1!A1,Sheet2!A1)
C5C5=IF(AND(Sheet1!A1>0,Sheet2!A1>0),SUM(Sheet1!A1,Sheet2!A1))
C6C6=IF(AND(Sheet1!A1<=0,Sheet2!A1<=0),"")
It works! Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,214,634
Messages
6,120,659
Members
448,975
Latest member
sweeberry

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
Back
Top