sum if ×2

amit96

New Member
Joined
Feb 15, 2022
Messages
27
Office Version
  1. 2013
Platform
  1. Windows
hello :)

I can't figure out how to the following thing -

If the value of cell D9 appears in column AG in sheet 'pay'

THEN

only where in column AF in sheet 'pay' = "paycheck"

sum the numbers from column C in sheet 'pay'.

hope I was understandable!

it's like first of all search the cell value in the range of the other sheet, and then search only specific word, and if those two were found, sum the numbers from column C but only where the first two conditions are being.


thank you so much!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
does this work
=IF(COUNTIF(Pay!G1:G23,Sheet1!D9)>0,SUMIF(Pay!F2:F23,"Paycheck",Pay!C1:C23),"")

i have used G and F instead of AG & AF - just to simplify the example
so should read
=IF(COUNTIF(Pay!AG1:AG23,Sheet1!D9)>0,SUMIF(Pay!AF1:AF23,"Paycheck",Pay!C1:C23),"")

OR are we looking for the same value D9 and only match those
in which case a
SUMIFS() should work
=SUMIFS(Pay!C1:C20,Pay!F1:F20,"paycheck",Pay!G1:G20,Sheet1!D9)


extend range to suit

Book2
ABCDEF
1
2
3
4
5
6
7
8
9712
10
11712
12
13
14
15
16
Sheet1
Cell Formulas
RangeFormula
A9A9=IF(COUNTIF(Pay!G1:G23,Sheet1!D9)>0,SUMIF(Pay!F1:F23,"Paycheck",Pay!C1:C23),"")
A11A11=SUMIFS(Pay!C1:C20,Pay!F1:F20,"paycheck",Pay!G1:G20,Sheet1!D9)


Book2
ABCDEFG
1
2
3
4
5
612
71
82paycheck
93
104
115paycheck
126
137
14
15
16
17
Pay



USING a SUMIF()

Book2
ABCDEF
1
2
3
4
5
6
7
8
9712
10
11712
12
13
14
15
16
17
Sheet1
Cell Formulas
RangeFormula
A9A9=IF(COUNTIF(Pay!G1:G23,Sheet1!D9)>0,SUMIF(Pay!F1:F23,"Paycheck",Pay!C1:C23),"")
A11A11=SUMIFS(Pay!C1:C20,Pay!F1:F20,"paycheck",Pay!G1:G20,Sheet1!D9)


Book2
ABCDEFG
1
2
3
4
5
612
71
82paycheck12
93
104
115paycheck12
126
137
14
15
16
17
18
19
20
Pay


Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
 
Upvote 0
Wouldn't SUMIFS do the job?
Excel Formula:
=SUMIFS(pay!C:C,pay!AF:AF,"paycheck",pay!AG:AG,D9)

EDIT
And the answer is: "No"
:oops:
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,177
Members
452,615
Latest member
bogeys2birdies

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