steve400243

Active Member
Joined
Sep 15, 2016
Messages
429
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello Forum, I am trying to get this formula to sum column F, if column A has a 1 and Column N also has a 1.

Code:
=countifs(‘Receipt Report’!$F:$F,’Receipt Report’!$A:$A,”1”,’Receipt Report’!N:N,”1”)

Thank you for any help provided.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
First off, you don't want to put numbers in quotes, and you want SUMIFS instead of COUNTIFS:

=SUMIFS('Receipt Report'!F:F,'Receipt Report'!A:A,1,'Receipt Report'!N:N,1)
 
Upvote 0
If you haven't tried already, remove the quotes "" from around the 1's, unless of course, they really are text values instead of numbers. Also, your title mentions =SUMIFS while your formula is =COUNTIFS... Either way, see what happens without the quotes.
 
Upvote 0
First off, you don't want to put numbers in quotes, and you want SUMIFS instead of COUNTIFS:

=SUMIFS('Receipt Report'!F:F,'Receipt Report'!A:A,1,'Receipt Report'!N:N,1)

Thanks so much Scott, This what I needed. Appreciate your time! have a nice weekend.
 
Upvote 0
If you haven't tried already, remove the quotes "" from around the 1's, unless of course, they really are text values instead of numbers. Also, your title mentions =SUMIFS while your formula is =COUNTIFS... Either way, see what happens without the quotes.

Thanks for the tips dreid! Got my answer from Scott.
 
Upvote 0
First off, you don't want to put numbers in quotes, and you want SUMIFS instead of COUNTIFS:

=SUMIFS('Receipt Report'!F:F,'Receipt Report'!A:A,1,'Receipt Report'!N:N,1)

Scott, What if the number in N would be 1, 2, or 3? And A could be different numbers also? Thank you.
 
Upvote 0
In that case, I would do something like this:
=SUM(IF(AND(OR('Receipt Report'!A1:A1100={1,2,3}),OR('Receipt Report'!N1:N1100={1,2,3})),'Receipt Report'!F1:F100))

Confirm with CTRL-SHIFT-ENTER rather than just Enter.
 
Upvote 0
In that case, I would do something like this:
=SUM(IF(AND(OR('Receipt Report'!A1:A1100={1,2,3}),OR('Receipt Report'!N1:N1100={1,2,3})),'Receipt Report'!F1:F100))

Confirm with CTRL-SHIFT-ENTER rather than just Enter.

Thanks Scott, I did not explain that well I think. N would be 1,2, or 3 only. and A would be an assigned container number like A123. I do not know how many, or the different number ahead of time. Sorry if i'm not explaining this very well.
 
Upvote 0
Something like this:

=SUMIFS('Receipt Report'!F:F,'Receipt Report'!A:A,"A123",'Receipt Report'!N:N,2)

or you could put the required value in cells and then refer to those:


=SUMIFS('Receipt Report'!F:F,'Receipt Report'!A:A,A1,'Receipt Report'!N:N,A2)
 
Last edited:
Upvote 0
Something like this:

=SUMIFS('Receipt Report'!F:F,'Receipt Report'!A:A,"A123",'Receipt Report'!N:N,2)

or you could put the required value in cells and then refer to those:

I greatly appreciate your help on this formula. Col A would be the same for some rows, but would be different numbers. Not just "A123". could be that for several rows, then "B456", for example, for several rows.

My desired result would be for example - the same number in col A goes for 10 rows. Column n will have a 1,2, or 3. in the next tab in cell P1 I would want the total from col F, if there is a 1 in Col N. for that matching container number in Column A.

P1 = Total for # 1 in Col N, P2 = total for # 2 in Col N, P3 = total for # 3 in Col N

Again I'm sorry if I'm not explaining it well enough.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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