Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2024, 02:36 PM
Karen615 Karen615 is offline Based on Date Entry, Calculate SUM & Percentage Windows 11 Based on Date Entry, Calculate SUM & Percentage Office 2021
Competent Performer
Based on Date Entry, Calculate SUM & Percentage
 
Join Date: Jun 2011
Location: Chicago
Posts: 112
Karen615 is on a distinguished road
Default Based on Date Entry, Calculate SUM & Percentage

Using Excel 365

I desperately need help. Please see attached.

Each time a site is inspected, a date is entered in column L. I need a formula (in cell R2) that sums the Principle dollar amount of sites inspected. Please see cell R2 for the actual result it should be.



Then I need the overall percentage to calculate as sites are inspected. Please see cell R3 for the actual result it should be. Five sites were inspected out of the grand total of 25 (cell C31).

I would GREATLY appreciate ANY help someone could offer.

Thank you in advance,
Karen
Attached Files
File Type: xlsx Plan2.xlsx (22.6 KB, 8 views)
Reply With Quote
  #2  
Old 02-04-2024, 05:34 PM
Alansidman's Avatar
Alansidman Alansidman is offline Based on Date Entry, Calculate SUM & Percentage Windows 11 Based on Date Entry, Calculate SUM & Percentage Office 2021
עַם יִשְׂרָאֵל חַי
 
Join Date: Apr 2019
Location: Steamboat Springs
Posts: 79
Alansidman will become famous soon enoughAlansidman will become famous soon enough
Default

Power Query Solution for total. Simple math for the other issue =COUNTIF(Table1[2024 Inspection],"<>"&"")/C31
Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filtered Rows" = Table.SelectRows(Source, each ([2024 Inspection] <> null)),
    #"Calculated Sum" = List.Sum(#"Filtered Rows"[Principle])
in
    #"Calculated Sum"
Reply With Quote
  #3  
Old 02-05-2024, 12:42 AM
ArviLaanemets ArviLaanemets is offline Based on Date Entry, Calculate SUM &amp; Percentage Windows 8 Based on Date Entry, Calculate SUM &amp; Percentage Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Or
Code:
=SUMIFS(E2:E29,A2:A29,"<>" & "",L2:L29,">0")
and
=COUNTIFS(A2:A29,"<>" & "",L2:L29,">0")/COUNTIFS(A2:A29,"<>" & "",E2:E29,">0")
Btw. Alan
OP doesn't use defined Table, and has manually put subtotals into table (practically created an paper document in Excel!). This is the reason I checked the column A - to exclude subtotals.
Reply With Quote
  #4  
Old 02-06-2024, 07:53 PM
Karen615 Karen615 is offline Based on Date Entry, Calculate SUM &amp; Percentage Windows 11 Based on Date Entry, Calculate SUM &amp; Percentage Office 2021
Competent Performer
Based on Date Entry, Calculate SUM &amp; Percentage
 
Join Date: Jun 2011
Location: Chicago
Posts: 112
Karen615 is on a distinguished road
Default

Thank you so much for your help. This worked great!

Could you be so kind as to explain how these formulas work?

=SUMIFS(E2:E29,A2:A29,"<>" & "",L2:L29,">0")

=COUNTIFS(A2:A29,"<>" & "",L2:L29,">0")/COUNTIFS(A2:A29,"<>" & "",E2:E29,">0")

You mentioned: "I checked the column A - to exclude subtotals."
How does checking column A exclude subtotals?

Your help is greatly appreciated.

Thank you,
Karen
Reply With Quote
  #5  
Old 02-06-2024, 09:47 PM
ArviLaanemets ArviLaanemets is offline Based on Date Entry, Calculate SUM &amp; Percentage Windows 8 Based on Date Entry, Calculate SUM &amp; Percentage Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Quote:
Originally Posted by Karen615 View Post
Could you be so kind as to explain how these formulas work?
SUMIFS() and COUNTIFS() are like SUMIF() and COUNTIF(), but you can check for any number of conditions. So:

=SUMIFS(E2:E29,A2:A29,"<>" & "",L2:L29,">0")

SUMS all values in E2:E29 for rows, where cell in column A is not empty (excludes subtotal rows, as for those was nothing entered into column A, and where cell in column L is > 0 (there were inspection dates in column L, and dates in Excel are always positive numbers - so when there was no date entered, the value of cell is 0, and when there is a date, the value of cell is > 1)

=COUNTIFS(A2:A29,"<>" & "",L2:L29,">0")/COUNTIFS(A2:A29,"<>" & "",E2:E29,">0")

1st COUNTIFS counts all entries in rows 2:29, where cell in column A is not empty, and there is a date entered into column L (the entry was inspected);
2nd COUNTIFS counts all entries in rows 2:29, where cell in column A is not empty, and there was some monetary amount entered into column E (the entry was not subtotal, and there was some money accounted). Essentially it returns the count all account rows. And probably you better replace COUNTIFS(A2:A29,"<>" & "",E2:E29,">0") with COUNTIFS(A2:A29,"<>" & "",E2:E29,"<>0"), so the formula will work when there are negative amounts too;
And as a last step, the count of inspected entries is divided by total count of entries to get the inspection percentage.

And a warning! In case you enter anything (even a space string " ") into column A for some subtotals row, the formulas don't work anymore (i.e. return a wrong result). This is the reason for my remark you having a 'paper document' in Excel. Much better way is to have a separate sheet(s) dedicated for data entry only (without any totals and subtotals), and then any number of report sheets, which read info from data sheet(s), and display it in any design you fancy.
Or you can have some rows at top of data entry page with SUBTOTAL() formulas, which then return totals for filtered records in data entry table. When the table is not filtered. those formulas return e. g. count of all entries in table, or total of all monetary amounts. When you filter the data entry table to inspected rows to be displayed, same formulas return the count of inspected entries, or total amount of inspected entries. When you filter the data entry table by values in column B (the ones determining subtotals in your original table), you get the count and summary amount for this value used for filtering, etc.
Reply With Quote
  #6  
Old 02-13-2024, 08:46 PM
Karen615 Karen615 is offline Based on Date Entry, Calculate SUM &amp; Percentage Windows 11 Based on Date Entry, Calculate SUM &amp; Percentage Office 2021
Competent Performer
Based on Date Entry, Calculate SUM &amp; Percentage
 
Join Date: Jun 2011
Location: Chicago
Posts: 112
Karen615 is on a distinguished road
Default

WOW! Thank you soooo much! This is very helpful.

Have a great evening.

Karen
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Based on Date Entry, Calculate SUM &amp; Percentage Sum & Percentage Based on Date Entry Karen615 Excel 5 02-10-2024 08:44 PM
Based on Date Entry, Calculate SUM &amp; Percentage Calculate week in Word document based on date entered into same document ArviLaanemets Word VBA 4 11-18-2019 12:25 AM
Text Form Field -Calculate Percentage Perk Word 5 04-18-2016 09:05 PM
How to calculate a rolling year-to-date percentage by quarter as the year progresses sleake Excel Programming 2 04-23-2015 11:51 AM
Based on Date Entry, Calculate SUM &amp; Percentage Formula to auto calculate Day of the week based on Date prasad@dmci.ca Excel 1 11-29-2011 01:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft