Excel split value equally until condition is met

excel_user2001

New Member
Joined
Dec 21, 2022
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
I think using the analogy of a gym will make my problem the easiest to understand. Say we own 2 gyms. At these gyms we provide personal training (PT) only in bundles of 5 sessions. These are booked online, and can be redeemed at either site.

My problem is that I want to account for the cash inflow as soon as someone makes an online booking BUT I do not know which site the sessions will be redeemed at. Therefore, I want to split revenue equally amongst the sites UNTIL a PT session is used up. At this point I know which site to attribute 1/5th (since we have a bundle of 5) of the revenue to, and the other 4/5ths can be split equally. This is then repeated until all of the sessions have been redeemed and revenue is apportioned accurately.

I have decent knowledge of excel but do not even know where to start with this. Would something like this even be possible on excel?

The only think i could think of which would be incredibly beefy, would be something along the lines of:
IFS( redeemed = 0, split rev. equally between sites, redeemed = 1, apportion 1/5th revenue to site which redeemed and the rest equally, ......)

If this is something that is possible I can provide sample data to make my question more clear, but didn't want to waste my time in case this is something out of Excels' abilities.

Thank you for any help!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Lots of questions but please look at the image and pass commments.

Amount is split two ways for sessions not completed.
 

Attachments

  • ExcelScreen.JPG
    ExcelScreen.JPG
    95.6 KB · Views: 18
Upvote 0
Lots of questions but please look at the image and pass commments.

Amount is split two ways for sessions not completed.
Thank you so much for the response, that formula looks great for completing the initial split!

I think the crux of the problem here (for me anyway) is getting your formula to update as people redeem their sessions.
I have 3 sheets (see mini sheet below), and I want a formula for the highlighted yellow cells (revenue for each site), that updates as more entries are populated in the attendance data.

sales and attendance.xlsx
ABCDEFGHIJKL
1SalesAttendanceRevenue
2Sale DateClient IDItem namePriceVisit DateClient IDItem nameSite (1 or 2)Site Name:£
312/1/2215 PT bundle$ 50.0012/1/2215 PT bundle1Site 1
412/2/2225 PT bundle$ 50.0012/2/2225 PT bundle2Site 2
512/3/2215 PT bundle1
612/5/2225 PT bundle2
712/6/2215 PT bundle2
812/7/2215 PT bundle1
912/7/2225 PT bundle2
Sheet4
 
Upvote 0
It would be much easier to have a seperate worksheet for Sales, Attendance and Revenue.

You can add the D-G columns in my sheet to the Sales worksheet and add formulas as appropriate.

If you make the Attendance data a Table then adding in these formula will be easier.

Can I suggest that you have a Sales ID or Booking ID, in both the sales and Attendance data, as it the Booking row that needs to keep track of the Attendances and not the Client. A Client can have multiple Bookings over time. You can add a lookup formula to the Attendance table to show the Sales ID or Booking ID.

The formula in the Revenue sheet is just a simple SUMIF calculation on data in the Attendance sheet. Another reason to make it a table.
You may want to add in a start and end date so that you can compare data for periods. You could also do a pivot table on the Attendance sheet.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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