Sumif or Countif - need help with correct formula

eileen123

New Member
Joined
Jan 23, 2020
Messages
22
Office Version
  1. 2016
Platform
  1. Windows
Hello! I am trying to figure out which formula to use to meet these criteria: If anything (not blank) is in Column B range: B2:B100 (stays constant), I want it to add a sum of a range of cells (G2:P2) and populate it in cell R2. Then I want to drag the formula down column R to apply to the corresponding rows. I am not sure the formula I am using is correct.

I would use the same formula for certain criteria for Column A and U. Thanks for your time & help!

1661200291709.png
 
Perfect! Thank you.
One final question (if possible) - in your row 4 - is there a way if there is data in both cells A & B that the sum populates in column R (not U)?
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Perfect! Thank you.
One final question (if possible) - in your row 4 - is there a way if there is data in both cells A & B that the sum populates in column R (not U)?

Yes it is possible.

Put this in cell R2 and drag it down

Excel Formula:
=IF(A2<>"",IF(B2<>"",SUM(G2:P2),""),IF(B2<>"",SUM(G2:P2),""))

Put this in cell U2 and drag it down

Excel Formula:
=IF(A2<>"",IF(B2<>"","",SUM(G2:P2)),"")

1661205441477.png
 
Upvote 0
Solution
Sid & Fluff, Would it be okay if I asked a follow-up question pertaining to this thread here?
 
Upvote 0
If it's directly related to your original question, that's fine. Otherwise you need to start a new one.
 
Upvote 0
Perfect, thank you. Here is my question, in the same spreadsheet I want to populate another worksheet FY23 PA Grp Funds by Program (cell B3) from data gathered from the first worksheet (Program Funds Total FY22/23) we worked on as follows:

FY23 PA Grp Funds by Program screenshot where I want the formula and results to populate in cell B3:
1661368681053.png


If there is anything in column A (PA Cohort) I would like it to sum the range under column M (Pitch Funding) and populate the cell B3 in the FY23 PA Grp Funds by Program worksheet
1661368703631.png
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

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