Excel, fill/drag & copy horizontal data while referencing vertical data

I am working on the attached Excel file and trying to drag and fill a formula horizontally from vertical data.
The data to be filled is in Row 3
The data to reference is in column G55:G81

Any ideas?
Checks---Balance.xlsx
GenericCogAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
Try this array formula

=SUM(IF(CELL("type",$D$55:$D$81)="v",(TEXT($D$55:$D$81,"mmmm")=D5),0)*(0&$G$55:$G$81))-D2
0
GenericCogAuthor Commented:
I'm not sure how that works. Can you explain it a bit please?
Do I paste this in cell E3 and drag across to P3?  If so that does not work.
0
Saqib Husain, SyedEngineerCommented:
This is an ARRAY formula. Do you know how to enter an array formula?
0
byundtMechanical EngineerCommented:
I changed row 5 to be the first of each month, formatted using Custom format mmmm. I entered 10/1/2013 in cell D5 and 11/1/2013 in E5. I then selected D5:E5 and dragged the little square at bottom right of selection marquee across to put the first of the month in each succeeding cell. Excel was smart enough to figure out the pattern.

This then allowed me to use a fairly easy to understand formula in cell D3. I copied that formula across to cell P3.
=SUMIFS($G55:$G81,$D55:$D81,">=" & D5,$D55:$D81,"<=" & EOMONTH(D5,0))-D2

EOMONTH returns the last day of the month. The SUMIFS is then adding up column G as long as the date in column D is between the first and last days of the month. I needed two criteria for the dates: one for >= the first of the month, and the other for <= the last of the month.
Checks---BalanceQ28270097.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GenericCogAuthor Commented:
Excellent work! The explanation of how and what you did is awesome!!  I actually learned from this!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.