The Excel PRODUCT Function

I have to confess that the PRODUCT function in Excel is one I’ve generally considered pretty useless. SUMPRODUCT is much more exciting to me. But this morning I was trying to do some projections for sales of my new cozy mystery and I ended up using the PRODUCT function two different times.

And because I’m a nerd and Excel things excite me, I figured I’d share where and how I used it.

This will also be useful to any writers who write in a series or are thinking of doing so and want to extrapolate from sales of a first in series to sales of the whole series.

So here’s the thought process and how the PRODUCT function can come into play:

At its most basic, if I publish a single book then my earnings on that book are equal to the price of the book times the payout percentage. (In reality, if you’re in KU or have a print version it’s more complicated than that because each format has its own value but we’re going to ignore that for now.)

Now, there’s a temptation to say, “If I write ten books in this series, I’ll earn ten times as much.” But that’s not how it works.

Not everyone who reads the first book will go on to read the other books. I have a series of eight related short romance stories and I see a drop off from story 1 to story 2 and then from story 2 to story 3. But from story 4 onward it’s very close to a 100% readthrough.

If I want to calculate the value of a new customer I can’t just take the price of each story times the payout. I also have to factor in how many readers actually make it that far into the series.

So the value of book 8 to me is not price times payout. It’s price times payout times % of readers of book 1 who read it.

This is the first place you can use the PRODUCT function.

Because the calculation you’re doing here is: price times payout times % who read book 2 times % who then read book 3 times % who then read book 4 times % who then read book 5, etc.

(In Excel for Self-Publishers I did a similar sort of calculation but used a different approach that just looked at book 1 to that particular book in the series because I had real data at that point. But this is extrapolating when you don’t have any data yet.)

One way to write that calculation is: =A1*A2*A3*A4*… where each of those values is in a different cell in Column A.

Another way to write it, though, is using PRODUCT. You just write =PRODUCT(A1:A9) assuming your price is in A1, your payout is in A2, and your readthrough rates are in Cells A3 through A9.

Isn’t that nice and simple?

I know, it’s a little hard to visualize. And you’re probably not going to set your data up exactly that way.

But let’s look at a simpler example, which is the second way in which I used PRODUCT.

First I had to calculate the value above. I assumed I had a ten book series with book 1 priced at 99 cents and the rest at $3.99 with a fifty percent readthrough from book 1 to book 2 that then goes up to 80% and then 95%, I calculated that I would earn $7.54 for each new reader.

Currently book 1 is priced at $3.99.

So that’s an increase in overall revenue by a factor of 2.70 just based on having more books out. (7.54 divided by 3.99).

But we also have that price drop factor at play. How many more people will read book 1 if it’s priced at 99 cents than are currently reading it when it’s priced at $3.99? For my purposes I said three times as many.

(This is for cozy mystery. Other genres might see no increase or even a drop. Or readthrough might be severely impacted depending on book 1 and book 2 prices. You have to know what you’re selling or have a guess how it’ll behave to do this.)

Next, we have the series factor. Some people prefer to read series instead of standalones. And more books means more visibility. So how much will having ten, presumably well-reviewed, books in a series impact book 1 sales? In this case I assumed that would double sales although there’s a good chance it could do more than that.

So if I want to take current sales on book 1 and try to figure out what I might earn if I have ten books out in that series what I need to do is take the amount I’m earning each month on that book and multiply it by that readthrough factor and then multiply that by the price drop factor (assuming I’m dropping book 1’s price, otherwise it’s just 1), and then multiply that by the series increase factor.

Which is another place to use PRODUCT. Here’s the Excel worksheet so you can visualize this:

Series Value Estimation

I have the increase factors in Cells C34 through E34, so my formula in Cell F34 is =PRODUCT(C34:E34) to get my overall factor of 16.2.

I can then take that number and multiply it by the amount I expect to earn on the first cozy when things reach a steady state. Let’s say $250. (In the image above that calculation’s done in Cell G34.)

(You can use PRODUCT again here, which is what I did. In that case, the formula is =PRODUCT(B34:E34) because I have Book 1 sales in Cell B34. Or you can just do =B34*F34.)

Based on these calculations I can say that if I have a Book 1 in a series that is earning me $250 a month and I write nine more books in that series and discount the first book to 99 cents while selling all the other titles at $3.99 with my assumed readthrough rates and price drop and series increases that I will earn, on average, $4,000 a month from those ten books.

Understand, though, that there are many many assumptions at play here. If my Book 1 to Book 2 readthrough is 75% instead, that number goes up to $6,000 a month for a ten-book series. If I see a four-fold increase in sales from having a series rather than a two-fold increase then it’s $8,000. If I have 75% readthrough AND a four-fold increase, then it’s $12,000 a month.

On the flip side if there is no series increase and dropping the price only doubles sales then it’s just $2,000 a month for a ten-book series. And if people fall off of the series as it continues (say you have lower and lower readthrough rates after Book 6) then it’s just $1,445 a month for that ten-book series.

(Don’t continue a series like that. Wrap it up as soon as you can. Book 1 to Book 2 you should see drop off. Family and friends will buy Book 1 to support you but not read the whole series, some people will find that the book just isn’t for them, and some will buy and not get around to it for five years. Book 2 to Book 3 may have another drop off because people who were on the fence with Book 1 may try Book 2 and then decide not to continue. But from Book 3 onward, you should really have your core audience.)

(I should also add that there could be a time factor at play here. The longer the series the longer it takes someone to read through that series. On a recent podcast someone mentioned six months for how long it can take to read through a series. For a very long one, I’d agree that might be true. For a trilogy, if you’ve really hooked a reader, I’d say one month at the longest. Of course, that’s from when they start reading it. But once you reach steady state for a series that should disappear in the wash because people should always be reading through your series each month even if they’re at different points in doing so.)

Anyway. You can make all of this insanely complicated if you want, but this was just a basic calculation I wanted to share using PRODUCT which I had so unfairly misjudged. Once you set something like this up, it’s easy enough to play with the numbers and see your full range of values.

 

 

Excel for Budgeting is Live

File this one under why I should never read my emails. Haha. Just kidding, this was one I’d been thinking of writing for a while but just hadn’t written yet. So that email someone sent a couple months ago asking how to apply Excel to budgeting was just a good reminder that I wanted to get this done.

Over the last ten years of self-employment I’ve developed an Excel workbook I use to juggle my finances. Because one of the biggest challenges of self-employment is cash flow. I can make $25K in one month and then nothing for three. So I have to always be monitoring where I am in terms of cash to pay my bills. And I have to know where I can look to get cash to pay my bills if there isn’t a big paycheck coming and there isn’t enough in the bank account.

So over the years I’ve developed a focus on my short-term liquid net worth and also on haircutting my assets. (Much like a broker-dealer is required to haircut their securities portfolio when they value their holdings.) Because a 401(k) is great and all, but it doesn’t do you any good if you can’t pay your bills today.

In Budgeting for Beginners I talked about all of this and how to judge where you are financially and take steps to improve upon that. But what I didn’t include there was the Excel workbook I use to track all of this. And it’s not exactly intuitive how you’d create something like this.

I now have one nice little worksheet I can print off that shows my next three months of cash flows, my assets and liabilities, my available credit, and my short-term and long-term net worth. But when I look at my trackers from ten years ago they are nothing like what I now have.

(I think I missed my calling as some sort of data nerd. But, oh well.)

So anyway, that’s what Excel for Budgeting is. It walks through how to create this workbook for tracking your finances. It’s what I use and (knock wood) I’ve somehow managed to stumble along for close to a decade now with uncertain income and making extreme life choices. I do think you should know Excel before you try to use it, but there are step-by-step instructions in there for how to create everything if you want to give it a try anyway.

(And, as a weird added bonus, if you’re like I once was and split time between two countries so have to deal with payments in multiple currencies, I covered that, too. Because, why not?)

Now maybe I’ll be turning to writing some fiction. Maybe. As long as I don’t walk my dog or check my emails before I start the next project.

Using Excel for an Optimization Problem

The astute reader will note that I didn’t (and won’t) write a book called Advanced Excel. Not because there aren’t a number of advanced Excel topics I could’ve written about but more because that becomes the realm of people who really get in the weeds on Excel and I’d also have to find a way to make it comprehensive and that just seemed a little too…much.

But yesterday on Facebook a friend of mine asked for Excel help so I thought I’d share the question and what I came up with here.

Here’s the scenario she gave: It’s career day. You have fifty students. Ten lecturers. There are four sessions, so each student can attend up to four lectures. Students have provided a ranking of their preferences from 1 to 10 with 1 being their top choice. Is there a way to have Excel tell you which students should be paired with which lecturers?

Short answer: Yes. Slightly longer answer: Not in the basic version of Excel. At least not at the scale we’re talking about here. (It can handle up to 200 decision variables but what I gave you above would have 500.)

So if you actually wanted to do this you’d have to get access to a more robust version of Solver. But you can use Excel to build a mini version of the problem.

I used four students and eight lecturers and rigged my data so that I knew there’d be a solution.

Here’s how it goes.

Start with your student data:

Student Data Data Optimization

Here you can see I’ve built a table with one student per row and their ranking of each lecturer across the different columns. (See how I rigged it so that two students want the first four lecturers and the other two want the last four?)

Next, create a “decision grid”. It’s the exact same as the first table except instead of student rankings all the values in the table are set to 1. (Could be set to zero, too. Either way works.)

Decision Grid Data Optimization

You also want to have the total lectures given by each lecturer (the last row) and the total lectures attended by each student (Column V). This is because these will have constraints that need to be met for our final solution.

Finally, create an “outcome grid” which takes the student ranking in the first grid and multiplies it by the value in the second grid. So if you put 1s in the second grid this will look just like the first grid, but it’s using a formula.

Outcome grid data optimization

At the end of the outcome grid you want a total value for each student (Column AE) and then at the bottom of that column of values you want the average of those student scores.

Now, to do this next part you need to enable Solver, which comes installed in Excel but isn’t automatically activated. Go to File->Options->Add-Ins and at the bottom where it says Manage Excel Add-Ins click on Go. This will bring up the Add-Ins dialogue box. Click the box for Solver Add-In and say OK.

Once you do that you will have the Solver option in the Analysis section of the Data tab. Click on it.

This will bring up the Solver Parameters dialogue box.

solver screen

Here’s where all the fun happens. In this case we want to minimize the average student score. So we’re minimizing the value in Cell AE7 which is where we have the average student score after they’ve been assigned to their lecturer. (This is because in this scenario 1 is the best outcome, 10 is the worst, so the lower the score per student the better.) So our Set Objective is Min AE7.

To do this, we need Excel to say yes/no to which lectures a student will attend. That is done by adjusting the 1s we placed in Cells N2:U5 to either be 1’s (for yes, go to that lecture) or 0’s (for no, don’t go to that lecture). That’s what we specify in the “By Changing Variable Cells” box. When Excel solves the problem it will do that for us.

But Excel needs to know our constraints. For example, that students can only attend 4 lectures. That’s why we tell it V2:V5 must equal 4. (Only make four entries per student equal to 1.)

And we need to make sure that Excel doesn’t do something wacky like decide you can attend half a lecture. So we have to say N2:U5 must be binary. (That means an integer that is either 1 or 0.)

And in this scenario, I had to limit the number of students each lecturer gave a lecture to to 2 so there could be a possible solution. (In the real life example this would be a minimum of number of students per session times the number of sessions and a maximum number of students per session times the number of sessions.) That’s the N6:U6>=2 part.

Finally, I wanted each student to at least be marginally happy with the outcome so I made it so that AE2:AE5 were all less than 12. (We don’t want one kid having a terrible outcome while everyone else has a good outcome.)

And that was it. Then you just tell Excel to solve it. Excel will run scenarios until it finds one that meets all of those criteria. (Or it will tell you it doesn’t have a solution which happened a few times to me when I was building this because I’d built it so it wasn’t solvable.)

If you let it implement its solution, you get something like this for that second grid:

Solver solution

In this case, each student attends four lectures, each lecturer lectures to two students, and (you can’t see it) all students have a score of 10.

As you can see, your constraints are crucial on something like this. And you really need to look at the outcome when it’s all done and see if makes sense and to confirm you didn’t miss some crucial constraint or set it wrong. (If that happens, change it, reset the grid, and run the solver again.)

Also, the model type you choose can have an impact. (It tells you when to use each type but I just try each one to see which one works.)

Now, one final caution. Solver will stop on the first feasible solution. I originally had student scores set to a possible value of 20 instead of 12 and it gave me a solution that worked, but wasn’t the ideal solution you see above.

Anyway. This is why I didn’t do much writing yesterday, because, sadly enough, I find this kind of thing fun so I was happy to set aside my current project to puzzle it out. And I thought it might be fun to see for those looking for more advanced uses for Excel.

How To Split A Cell Diagonally In Excel

Someone reached out to me today because they’d been reading one of my Excel guides and were wondering how you could split a cell diagonally in Excel and still be able to enter information into each section.

Short answer is, you really can’t. At least, not that I’m aware of.

A quick internet search turned up a couple approaches that basically involve creating the appearance of a split cell, but the problem with that approach is that if you want to do anything with the values you’ve split, you really can’t.

For two different ways to do that approach,  see here and here.

It bugged me that you couldn’t do anything with the values with these approaches, so I came up with another way to do it. (Which may already be out there, but it wasn’t the first five or six of the search results I found and I told the person who emailed me I’d put it up here with screenshots for them.)

This approach involves using four cells to basically create the appearance of one split cell. Here are the steps.

  1. Select four cells, two in one row and the two directly below them. Fill those cells with white and put a border around them.Excel Create Horizontal 1
  2. Pick two opposite cells. So in this case A and D or B and C and choose Format Cells, Border and then add a diagonal border to create a continuous line across the selected cells. Here I’ve chosen A and D so I want line slanted left to right.Excel Create Horizontal 2
  3. Enter your values into the other pair of cells. So in this case that would be B and C. Middle Align and Center the values in those cells and then change the height of the columns and width of the rows involved to get the appearance you want.Excel Create Horizontal 3
  4. The issue you now have is that for that diagonal box there are two rows and two columns around it. If you wanted to create just one row to the right of the box or just one column below the box, you’d need to use merge cells. Here I’ve used Merge & Center on cells H6 and H7 and on cells F8 and G8. I then used the Format Painter to merge and center the remaining cells. (You have to do it one row or column at a time or you’ll end up with one giant merged cell, which you don’t want.)Excel Create Horizontal4

And there you have it. A way to create a diagonal across a “cell” and still be able to manipulate the values in that cell if you need to.

(For more Excel resources, click here: https://mlhumphrey.com/microsoft-excel-resources/)