My invoice spreadsheet has gotten out of control. Help on cutting down MODROW and IF forumlas, and making it far easier to use.

nervousenergy

New Member
Joined
Dec 17, 2013
Messages
4
Hey.</SPAN>

I'm using Excel 2007.</SPAN>

I've cross-posted to Reddit, here. </SPAN>

Attached is the spreadsheet I've created, with some fake data and any identifiable info removed. https://www.dropbox.com/l/yy2nXCSVcV2B4BbtWc6sE8

I have been tasked with creating a spreadsheet for my work, which would allow us to input in invoice details for various Sports Clubs.</SPAN>

Introduction</SPAN>
There are several sports clubs we spend money on. We can spend money in various categories (Promotion, Equipment, etc). We have several set budgets that the money can be drawn from. </SPAN>

I've tried to create a spreadsheet which allows us to do this and tottle up all the figures to display (See Totals worksheet). The main aim of the spreadsheet was to be able to nicely see how much we spent, where, what on, and for what sport. </SPAN>

I should preface by saying I've *very* little knowledge of Excel, and what you can see in the spreadsheet I exampled was what I could cobble together after days of tinkering</SPAN>

What I've got so far is.. okay. But I'm really not happy with it. </SPAN>

Problems</SPAN>
Scroll to the sides of each "Sport" sheet, and you can see lots of columns that I use to work out the calculations. What the columns do is check each "live" column in turn (Columns B to G) for a "Budget Name" (which is in the dropdown box), and if theres a figure above it. If there is, then it copies the figure and totles it up.</SPAN>

That is a needlessly complicated way of doing it, but I can't figure out a better way. What I wanted to achieve was for the figure to be linked to the "Budget Name" so that the sheet knows what a figure is linked to a certain budget. </SPAN>

Another problem is: check out the formula on the pink Total row in any of the "Sports" sheets. It's a horrible MODROW formula that totles up every seventh row (every "Amount" in the columns). Is there an easier way of doing this?</SPAN>

Another problem: The budget names derive from a dropdown list, which derives from the "Budgets" list on the "Totals" page. This works, except if you change one of the Budget names on this list (i.e. change Budget A to Sport Budget), it doesn't carry across to the other sheets which use that name. Is there a way to automatically update all the names of the Budgets so that they are consistent?</SPAN>

And finally.. is there just a better way of showing and inputting and calculating the data as a whole? I thought a great way would be to use a Form i.e. Microsoft Access, where you put in invoice details individually and then that carries over and automatically updates a Totals view. Seems that Excel doesn't support this though. Would VBA help? (I've zero experience of the VBA editor).</SPAN>

Can anyone help design me a better spreadsheet? I hope I'm not asking too much, but I've been stressing over this for a few weeks now, and it's getting to the point where we NEED to start putting actual data into it. </SPAN>

A bit of a flaw in the whole sheet is that the allocated Budgets need to be flexible. They're also talking about wanting to allocate bits of the set budgets to various individual sports, and to be able to calculate a "projected" spend and an "actual" spend. I've no idea how I could get that to work.</SPAN>

This is all horrendously complicated, isn't it? At least, it is to my little mind. Have a look over the spreadsheet I exampled, and ask me to expand on anything I've said. I'd really appreciate some help. </SPAN>

Thanks!</SPAN>
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi, and welcome to the forum.

If I was doing this from scratch I would use two worksheets, one to store the data, "DATA" and one to summarise the totals, "NEW TOTALS".

The Data sheet would be laid out like:


Excel 2007
ABCDEFGHI
1Invoice#DateSportCatagorySupplierAmountBudgetPaidNotes
23473512/10/2013Sport 1OtherXYZ£70.00Budget AYesThis money was spent on several [x]
34564564624/10/2013Sport 1InstructorsZXY£900.00Budget CYesaaa
4464516/11/2013Sport 1PromotionZXZ£75.00Budget AYesbbb
54564502/12/2013Sport 1EquipmentZXZX£90.00Budget AYesccc
64564503/11/2013Sport 1TrainingZXZXZ£90.00Budget DYesddd
723456709/09/2013Sport 2Otherzzz£95.00Budget BYesyyy
Data



In order to maintain spelling consistency, Sport, Catagory and Budget are obtained from named lists.
These are stored on the DATA sheet. Their names are in the header row.


Excel 2007
KLM
1BudgetsSportsCatagories
2Budget ASport 1Other
3Budget BSport 2Instructors
4Budget CSport 3Promotion
5Budget DSport 4Equipment
6Training
Data



To set up:
Data => Data Validation
Allow: List
Source =Budgets

From here the obvious route to go for getting totals for Sports, Catagories and Budgets would be to set up a pivot table on this data.

But, using your template, we can use SumIf() to pull the data through to the NEW TOTALS sheet.


Excel 2007
ABCDEFGH
2SportTotal SpentOtherInstructorsFacility HirePromotionEquipmentTraining
3Sport 1£1,320.00£165.00£900.00£0.00£75.00£90.00£90.00
New Totals
Cell Formulas
RangeFormula
B3=SUM(C3:H3)
C3=SUMIF(Data!$D:$D,C2,Data!$F:$F)
D3=SUMIF(Data!$D:$D,D2,Data!$F:$F)
E3=SUMIF(Data!$D:$D,E2,Data!$F:$F)
F3=SUMIF(Data!$D:$D,F2,Data!$F:$F)
G3=SUMIF(Data!$D:$D,G2,Data!$F:$F)
H3=SUMIF(Data!$D:$D,H2,Data!$F:$F)




Again, to maintain spelling consistency, column A is selected from a validation list Source =Sports

And we use SUMPRODUCT() to pull through the data for your other table.


Excel 2007
ABCDEFG
10Budget ListTotal Spend: Budget Breakdown
11BudgetsSet BudgetRemaining of SetTotal SpentSport 1Sport 2Sport 3
12Budget A£2,000.00£1,765.00£235.00£235.00£0.00£0.00
New Totals
Cell Formulas
RangeFormula
C12=B12-SUM(E12:H12)
D12=SUM(E12:H12)
E12=SUMPRODUCT(--(Data!$C:$C=E$11),--(Data!$G:$G=$A12),(Data!$F:$F))
F12=SUMPRODUCT(--(Data!$C:$C=F$11),--(Data!$G:$G=$A12),(Data!$F:$F))
G12=SUMPRODUCT(--(Data!$C:$C=G$11),--(Data!$G:$G=$A12),(Data!$F:$F))



Highlighted cells are drop down validation lists.

This approach would remove a lot of duplication
I hope it gives you some ideas for your project.

Bertie
 
Last edited:
Upvote 0
Correction
SUMIF won't work. We will need to use SUMPRODUCT for the first table.


Excel 2007
ABCDEFGH
2SportTotal SpentOtherInstructorsFacility HirePromotionEquipmentTraining
3Sport 1£1,225.00£70.00£900.00£0.00£75.00£90.00£90.00
New Totals
Cell Formulas
RangeFormula
B3=SUM(C3:H3)
C3=SUMPRODUCT(--(Data!$C:$C=$A$3),--(Data!$D:$D=C$2),(Data!$F:$F))
D3=SUMPRODUCT(--(Data!$C:$C=$A$3),--(Data!$D:$D=D$2),(Data!$F:$F))
E3=SUMPRODUCT(--(Data!$C:$C=$A$3),--(Data!$D:$D=E$2),(Data!$F:$F))
F3=SUMPRODUCT(--(Data!$C:$C=$A$3),--(Data!$D:$D=F$2),(Data!$F:$F))
G3=SUMPRODUCT(--(Data!$C:$C=$A$3),--(Data!$D:$D=G$2),(Data!$F:$F))
H3=SUMPRODUCT(--(Data!$C:$C=$A$3),--(Data!$D:$D=H$2),(Data!$F:$F))


--(Data!$C:$C=$A$3) - this creates an array of true/false depending on the condition
--(Data!$D:$D=C$2) - this creates an array of true/false depending on the condition
(Data!$F:$F) - When both of these conditions return TRUE the value in column F of the data sheet is totalled
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,078
Latest member
skydd

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