Calculating difference between two cells eg: ticket numbers

MADIME39

New Member
Joined
Jan 15, 2020
Messages
4
Platform
  1. Windows
Hello, I have a spreadsheet where I need to enter a beginning ticket stub number in B7, the ending ticket stub number in D7, and then multiply the number sold by the per-ticket cost. When I enter, for example, starting ticket #0 and ending ticket #9, it gives me 9 as a result, however 10 tickets were actually sold (ticket #0, 1, 2, etc). Below, rows 7 and 8, 10 tickets were actually sold, but it's calculating as 9.
1579199293773.png



I'm an Excel novice, so I thought I could enter "A3-A1+1" in F7, but then if the beginning and ending ticket numbers are blank, it still shows a "1" for tickets sold, and multiplies that "1" by the dollar amount. Since I'm also adding up the total dollar amounts, I can't have that either. I'm sorry if this is confusing!

1579199126485.png


Thank you in advance for any help you can offer!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Try this as your formula - it will only add the 1 if the cells aren't both blank:
=A3-A1+if(A1&A3="",0,1)
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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