Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a financial statement which needs to import month to date and year to date figures. However, it also has to add figures together for a total amount. I have the following formula which works fine but only with one pha and proj: =IF(ISERROR(INDEX(-PHDATA!$F$2:$F$101,MATCH($B7,PHDATA!$E$2:$E$101,0))),"-",INDEX(-PHDATA!$F$2:$F$101,MATCH($B7,PHDATA!$E$2:$E$101,0)))
What I need to do is search the many PHA and Proj codes, if a match then add all the figures within an account. For instance,
pha proj account amount
01 001 4100 100.00
01 002 4100 100.00
01 003 4100 100.00
02 001 4100 100.00
02 002 4100 100.00I need to add to my formula a way to lookup the pha 01 and proj 001 and 002 (first) and then match the account numbers and add both 4100 to come up with 200.00. If no match then 0, otherwise the total would be 200.00.
Please help, I have been racking my brain for a while now with no avail.
Thanks
Mirtha B.

Thanks Cliff for helping. The example is as follows:
pha proj account current mtd
01 001 111100 100.00 200.00
01 001 419000 100.00 100.00
02 001 111100 100.00 100.00
02 002 111100 100.00 500.00
02 003 419000 100.00 200.00
02 003 442000 100.00 400.00
02 004 111100 100.00 200.00
04 001 111100 100.00 200.00
04 001 419000 100.00 300.00I want to add the following together:
01 001 111100 $100.00 $200.00
02 001 111100 100.00 100.00
02 002 111100 100.00 500.00
total 300.00 800.0002 004 111100 100.00 200.00
04 001 111100 100.00 200.00
total 200.00 400.0001 001 419000 100.00 100.00
total 100.00 100.0002 003 419000 100.00 200.00
04 001 419000 100.00 300.00
total 200.00 500.0002 003 442000 100.00 400.00
total 100.00 400.00The formula needs to extract figures from multiple pha and proj add them together and input that number into a cell. The criteria would be the total of pha 01 and 02 proj 001 and 002 need to be added together while the other pha and proj will be seperate or together with another group of pha and proj. I'm not sure how to insert a file for your review. If possible let me email you what we are using. Thanks, I will continue to look into pivot tables but if you can help, I will greatly appreciate it.
Mirtha B.

Mirtha
If your data is in columns A:E, in column F add a formula to produce a proj of 001/002 if the proj is 001 or 002 otherwise producing the normal proj: =IF(OR(B2="001",B2="002"),"001/002",B2)
In column G add a formula to identify a proj 001/002 with a pha of 01 or 02, otherwise producing the normal pha: =+IF(F2="001/002",IF(OR(A2="01",A2="02"),"001/002 pha1/2",A2),A2)
You can now produce 2 pivot tables based on columns C:G with row fields account, col F, col G in that order, and data of the sum of current and mtd.
In one pivot table only select pha of "001/002 pha1/2", in the other pivot table select all pha except "001/002 pha1/2".I’ve produced all the totals in your example using the above.
I’ve sent a you PM, in case the real problem is more complex than the example
Cliff

Thanks Cliff, I appreciate your help. I will try it and let you know if it works or if I (with you help) have to go back and re-think the issue.
Mirtha B.

![]() |
how to split an archive e...
|
Outlook 2007 problem
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |