Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-22-2012, 08:38 AM
CrabApple CrabApple is offline How to take the sum of every value that meets two conditions Windows 7 64bit How to take the sum of every value that meets two conditions Office 2010 64bit
Novice
How to take the sum of every value that meets two conditions
 
Join Date: Jan 2012
Posts: 17
CrabApple is on a distinguished road
Default How to take the sum of every value that meets two conditions

Hi! Thanks in advance for any help. I'm trying to automate part of the expense report I use. I enjoying playing around with formulas, but am a novice at best and don't know how to proceed here.



A little background:

-the expense report is biweekly, and the same report is used for both the first and second part of every month. This means that each date row has two values (1st & 16th, 10 & 25th, 15th & 30th, etc.). The dates are always mutually exclusive (there will never be an expense report with both the 1st and the 16th on it).

-data is entered on the second page and transferred onto the first page for most sections automatically.

In the expense report, there is a section that does not automatically tabulate and transfer the amount to the first page because the formula to do so is much more complicated than the rest.

This section is below:



Using the example above, I am interested in developing a formula to do something like the following, crudely put:

(=IF (DAY((A23))=1 OR 16 AND IF C23="O" OR "P/T" THEN B23, 0) + (=IF (DAY((A24))=1 OR 16 AND IF C24="O OR "P/T" THEN B24, 0) + (=IF (DAY(A25))=1 or 16 AND IF C25="O" OR "P/T" THEN B25, 0) ... ((=IF (DAY((A38))=1 OR 16 AND IF C38="O OR "P/T" THEN B38, 0)

In other words, I would want to know what 2.50+2.20+6.00 is because they are

-all incurred on the same date, and
-are either "P/T" designated (as in the case of the first two) or "O" designated.

Whatever the sum proves to be, I would then want it to be transferred to the first page by the corresponding date and in the appropriate column (in this case the 1st of the month under "parking/tolls and other":



(note how each row has two dates assigned to it to save space)

Some problems include:

I never know how many receipts I am going to have for any particular day.

The second page section is set up in such a way that there is not a permanent cell to cell ratio. As in the example above, I may have three receipts on the 1st, no receipts on the 2nd, and one receipt on the 3rd. I can't always link A26 to the 3rd, for example, since I may have no receipts for the 1st and 2nd on next month's sheet.

I therefore need to write a formula that will evaluate every row in the section for meeting two conditions. Every row that meet the criteria for a particular day (and designation, "O" or "P/T") would then be added up and displayed by the corresponding date on the first page. Ideally I'd like to use the same for Entertainment ("E") costs, but I almost never have those. Yet I *often* have receipts!

(note: I manually entered these values onto the first page by way of example. Having to manually enter them, though, is precisely what I want to avoid)!

Does that make sense?

I have attached the spreadsheet for reference if anyone would care to play with it. I realize this may be ridiculously simple for some, but any advice whatsoever would be greatly appreciated!

-CrabApple
Attached Files
File Type: xls Expense Report (blank).xls (70.0 KB, 14 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
6 conditions formula paconovellino Excel 2 03-05-2012 06:45 AM
How to take the sum of every value that meets two conditions 3 Conditions Laurie B. Excel 4 08-15-2011 10:27 PM
how to set an equation with three conditions? Jamal NUMAN Word 0 07-09-2011 06:05 AM
How to take the sum of every value that meets two conditions Count with multiple conditions bundy5150 Excel 4 02-22-2011 10:00 AM
How to take the sum of every value that meets two conditions Using Conditions to Add Values EclipticalD Excel 1 07-08-2010 09:50 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:10 PM.


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