VBA To Calculate Profit & Loss Of Each Race Bet
Feb 1, 2009I had a member make the MACRO in the attached spreadsheet some time ago, when i run it on the spreadsheet a runtime mismatch error occurs. I cant find the mismatch.
View 4 RepliesI had a member make the MACRO in the attached spreadsheet some time ago, when i run it on the spreadsheet a runtime mismatch error occurs. I cant find the mismatch.
View 4 RepliesI have a trading system spreadsheet that I am at a loss as to how to calculate the profit and loss.
I was unable to attach a sample of the spreadsheet. I hope this explanation works. If not, I could email it.
Where:
Market position is either 1 or -1
Entry price is the price where the position is reversed.
For example:
H3=1 and I3=100.56, then
H4=-1 and I4=100.88, then
H5=1 and I5=100.53
I need to calculate the profit as follows:
I4 - I3 (because market position of 1 expects the price to go up) and then,
I4 - I5 (because market position of -1 expects the price to go down)
I want to calculate this as a running total to the bottom of the column.
This is the formula I was working with, but it doesn't work:
=IF(OR($J4="",ISERROR(MATCH(-$J4,$J4:$J$55,0)),),"",$J4*(OFFSET($K4,MATCH (-$J4,$J4:$J$55,0)-1,)-$K4))
I'm trying to design a Profit and Loss template that calculates off an accounting software data dump. I will attempt to explain the problem here but I have included a summary in the linked workbook which would be easier.
DOWNLOAD WORKBOOK: [URL]
I have two problems:
The Formula: Basically, I need to calculate every cell in the Profit and Loss statement based on the below criteria: The Profit and Loss item accounts, e.g. Gross Income has 6 accounts. There is a reference table for these - so incorporate index match/vlookup? User selected data from 4 combo boxes.
I am thinking a SUMIFS formula (using the combo box values) and somehow combining a vlookup to pull the items accounts. I'm starting to think that VBA is the best method?
Tweaking: The attached workbook is a small example. The full data dump contains 60,000 rows.
I have a workbook that contains several worksheets. The 2 important sheets are Imports and Sales.
In reading the MS KB, the help screens and this forum, I found a way to create a pivot table from 2 sheets using Data>Pivot Table>Multiple Consolidation Ranges. While that PT will provide a basic inventory and profit picture, it only allows 4 selects.
When these products are imported there are several SKU's. What gums up the works is there are several vendors for the same SKU's. Each vendor has a different price. The selling price is constant so the profit made on each particular item varies.
I would like to be able to keep track of inventory by vendor as well as profit by vendor.
Using the Consolidation PT does not seem to work.
I also tried making one sheet to hold all the data. i.e. data showing imports and sales. However, each entry is driven by the date. So while item A was received on 1/1/07, it was not sold until 1/2/07. The necessary columns for imports are filled in while the columns for sales remain blank until it is their row entry indicating a particular sale. At which point all the columns regarding Imports are blank. I swear, looking at the data sheet with all those blanks (actually0's) is like looking at a mouth full of broken teeth. The resulting PT is also not attractive.
I can not imagine I am the first person to have this problem. How do others handle figuring inventory and profits when you have two sheets. Are Pivot Tables the wrong solution? What would be better?
I have multiple departments I need to keep track of multiple numbers with. For example, I need to see the cost of payroll for last fiscal year, vs this fiscal year and have excel show that as a gain (bad) or shrink (good).
I need to track sales this FY vs last FY, obviously, a gain is good and shrink is bad.
Finally, I need to track d&d goods this FY vs last FY.
Where I'm getting held up is, for example last year's payroll was 12000 and this year's is 12500 but next months is 11000 this FY vs 13000. How do I get excel to figure out that payroll decreasing is good and not just do simple subtraction or negative addition thereby allowing me to just plug the numbers in and excel figure out if what I'm throwing at the cell is bad or good comparing to last year?
Also, if I could figure out the if/then to show positive numbers green and negative numbers red that would be quite awesome too.
How to compute the realised Profit or Loss for each of the shares transacted for the year ended 31 December 2008 based on average cost of each share.
using AVERAGEIF, if appropriate. [Pls refer to the attachment.]
I have a spreadsheet to record profit or loss on a daily basis. The figure for each day can therefore be positive, negative or zero.
I want to add a column to display the total for the last 7 days (NOT the last 7 calendar days), in which either a profit or a loss was recorded (so excluding any cell that is zero).
I would prefer to add (insert), the column for each day as it comes and the range would obviously vary if the new day's figure was not zero.
Formula to get the Quarter number for the highest profit per Product, like in B16:F16.
The excersiser instracted us that it must be with one formula with no Macro, not User Defined Function and not openning additional colums.
I know how to find the qtr. Number - like for A2: =INT((MONTH(A2)+2)/3) but I am lost in finding how to combine the calculation for the Qtr and the most profitable Qtr. probably with MAX on SUM.
I have attached a chart I'm working on. Each item is assigned a part number and it automatically takes away from the inventory each time an item is sold. I was wondering if the bottom half could work with the top to determine profit.
Example:
Customer purchases Part # 3 (C15) Quantity 1 (D15) for $450 (E15). Is there any way to set it up so whatever part number they enter...it subtracts their sold price from the cost (C5 through C11) to show the profit in (F15).
I have a price sheet for my store in Excel. I want to make the spreadsheet easy for my sales people to use to calculate differing profit levels. I'd like to embed a drop down box at the top (I can do that part) that they can select, say, 10%...20%...30% markup. I know how to do that basic formula. I don't understand how to link that formula to a number selected in a drop down box. I don't know how to make the prices change based on the value selected in the drop down box. I can't do vlookup because it's about 1500 lines long. Also, it doesn't have to be drop down box based--that's just the idea in my head. I tried just making a macro that would run when they hit the button, but when the macro runs it switches the focus back to the top, very annoying if you were looking at prices on cell D811.
View 7 Replies View RelatedI run a slimming club and would like to use Excel to keep records of members weights, losses, gains etc. What I would like to do is enter their starting weight into a cell then each week when they are weighed enter a loss or gain in an adjacent cell. I would then like Excel to calculate that loss or gain as a percentage of their original weight. Is this possible?
View 11 Replies View RelatedI need to develope a macro for Excel to calculate desired profit margin depending on our cost of each item. Here's the scenario.
A1: landing cost
If 0
Is there an excel formula that can calculate a proposed selling price by entering a desired profit margin percentage and knowing the cost of goods sold?
I know that gross profit is calcualted by subtracting the cost of goods sold from the selling price and that the gross profit margin is calculated by dividing gross profit by the selling price..but not coming up with a way to back out a selling price by just knowing the cost of goods sold and entering a desire gross profit margin?
I am running a contest for my office and the theme is 'nascar'. Anyway - we'd like to chart the contestants using a racetrack. Is this possible in Excel or any other MS Office tool?
Basically I'd like to show the placement of ten contestants on a circular racetrack. It would be updated weekly.
I have the following examples of text in column A
Race 1 - NORTHAM FEED & HIRE MAIDEN STAKE (SKY2)
Race 12 - NORTHAM MAIDEN STAKE (SKY2)
I want to isolate the race numbers so thy are in column P as follows
1
12
I have the following table for results in 7 races by 8 competitors (NB Not all competitors compete in every race)
Competitor Race 1 Race 2 Race 3 Race 4 Race 5 Race 6 Race 7
........A...........3..........5..........4.........6..........4........1
........B...........2..........4..........3.........4..........6........3
........C...........4..........3..........2.........5..........5........4
........D.......................6..........1....................7.........2........3
........E...........7..........7..........8....................3.........5........4
........F...........1..........2..........6.........1..........8........8........1
........G...........5..........1..........5.........2..........1........7.......5
........H...........6..........8..........7.........3..........2........6........2
What I'd like to have is a table with summary results by the follwing criteria:
Most 1sts:
Most top 3:
Most bottom 2:
Lowest average position:
Highest average position:
What formulas would I have to use to get each of the 5 results?
1: two colums of data for each car (lap distance covered and speed). Now each driver is going to decide to brake at different points.
2: i have coner data (eg corner 1 is at 150meters to 200 meters, corner 2 is at etc)
3. I am trying to create something that will do the following.
determine the lap distance at which the driver is braking (the point where speed decreases). I would like to do this for each corner and each driver. I am struggling to find a way of determining how to read the "lap distance" value when the corresponding "speed" value stops increasing and actually starts to decrease. This is the point at which the driver is braking
=C4+(0.3*(C5-((C2-1)*C3)))
Where C4 is 'Qualifying time', C5 is 'Starting fuel', C2 is 'Lap number' and C3 is 'Fuel consumption'. I also plan to make the 0.3 a changeable variable.
I'm not fussed as to whether or not this is a realistic function that would work in a real race, it's only hypothetical. However I would like to have a function that would give me the over all race time at any given lap, not just the lap time for it.
In cell "C4" how would I write the formula to calcuate my precentage profit based on the given cost and sell pricing.
View 3 Replies View RelatedI have a program running on my computer called Orbits.
What Orbits does is monitor a race track, and via a transponder in each race car, when a race car crosses the start/finish line Orbits will record that infomation.
The orbits program continually feeds data out the port 50000.
I can start hyper-terminal (yes the free one that comes with windows) and create a link the the computer running orbits. I use IP and port (Ex. 10.0.0.1 and port 50000).
As the race is going on I can see the data in hyperterminal: Below is a sample.
$F,9999,"00:00:00","19:52:40","02:09:14","Green "
$F,9999,"00:00:00","19:52:41","02:09:15","Green "
$F,9999,"00:00:00","19:52:42","02:09:16","Green "
$F,9999,"00:00:00","19:52:43","02:09:17","Green "
What I would like to do Is to get this data LIVE into excel, as the race is going on.
I have no idea of to get this data into Excel since It is not saving it as a file.
This is the Case:
I Produce something with a €2000 cost price. this is variable.
I Sell it for lets say € 2500,- to someone this is also a variable.
That's makes a Profit of € 500,- on the sale. This is 125% revenue
Until here, no problem using a spreadsheet. but now the difficult part.
I have to split of the 25% margin over 2 persons. This has to be done as follow:
a. The first slice is 2,25 for Mr A
b. The second slice is 15,00 for MR B
c. The Third Slice is 2,75 for mr A
This divides 20 of the 25 % over 2 persons. Still 5% margin remains
The last 5 is devided as follow:
d. 85% for MR A
e. 15% for MR B
So in this case:
MR A receives: a:€45 + c:€55+ d:€85 = €185,-
MR B receives: b:€250 + e:€15 = €265,-
The tricky part is when the margin is less than 20%.
for example; If the margin is 14%. than only slice a. and a part of slice b. an be paid off. so in that case;
MR A receives: a:€45 + c:€0+ d:€0 = €45,-
MR B receives: b:€230 + e:€0 = €230,-
Any formula which calculates the revenue for MR A and B automatically based on only the cost and selling price.
A B
1 Cost price - €2000
2 Selling Price - €2500
3 MR A - €185,-
4 MR B -€265,-
I'm using a spread sheet to determine what I should charge customers. I want to make at least $300 profit on every job. If my profit is not at least $300 then I must up my price until profit reaches $300. Currently I'm manually adding a percentage (Factor) to the original price until I reach $300 profit. In the image below:
A is the original price
B is the factor by which I multiply the original price to increase it
C is the new figure which is reached after multiplying (1+B2)*A2
D is the costs related to that job (I enter these manually on a separate sheet within the workbook)
E if the profit (C-D)
I use a factor in B because when I increase the price, then I have to increase several parts of the job by the same percentage so I multiply each part by this factor to increase the price of each by the same percentage.
Now what I would like to do is if E2.
How do I come up with a price that will make my profit and my customers savings equal.
Example:
Retail price $178.99
My cost $113.46
If I charge $142.23 then my profit is $28.76
Customer pays $142.23 plus $8.00 shipping ($150.23)
$178.99 Retail minus $150.23 = $28.76 savings
I have two columns for a Home and an Away win-loss records for a team over a few seasons. The win-loss stats in each column are in the form 24-13 (2-two digit numbers with a hyphen in between). How can I get a total at the bottom of the column for all the win-losses?
View 9 Replies View RelatedI need to work out the profit margin from goods i sell.
I have cost A2
Pack size A3
Net cost A4
Tax A5
Gross price A6
I need to work out the margin between A5 and A6.
In my spreadsheet, I have data for each sale in each row. Column C is the buy price, and column D is the sell price. I need column C to be subtracted from column D to get the profit into column E so that I can AutoSUM any cells in column E for total profit over any time period. The problem I'm having is that in columns C and D, I have either a dollar sign in front, or the letter m following without a space (ie $45.00 or 150m). Many cells in column C also contain another word following the buy price, and many cells in column D have a date following the sell price (ie $32.00 12/11 or 42m buyout).
Examples of how my spreadsheet looks:
A1: 12/13/12 B1: Item #1 C1: 100m D1: 152m
A2: 12/14/12 B2: Item #2 C2: $20.00 D2: $35.00
A3: 12/15/12 B3: Item #3 C3: 90m bid D3: 120m 12/16
So looking at my example above, I would need cell E1 to automatically show "52m", cell E2 "$15.00", and cell E3 "30m"
How I can get a formula for all of column E that will give me my profit for both $ and "m" for each item (row). I have tried the SUM function but just keep getting the #VALUE! error, it does not ignore the text like many people say it should.
How do I track my total weight loss in excel? Here is an example of what I am trying to do.
8/1/2008 228lbs
8/2/2008 225lbs
8/3/2008 223lbs
Total 5lbs
I would like use a formula that would subtract my absolute weight loss total day by day in August. Basically, I want the total "cell" to equate to my total weight loss in August. For Example after 8/3/08 the "total cell" should equate to 5 lbs. What formula do I use to do this?
I have a excel 2000 spreadsheet that has beginning and ending dates for certain services. I'm trying to tease out what our customer base has been doing over time in aggregate- i.e. how many customers subscribing to X in a given month/year.
The only way I've been able to do this in the past has been generating pivot charts of start dates (with 'start mo' and 'start year' busted out) as a positive count (+1), stop dates (with 'stop mo' and 'stop year' busted out) with a negative count (-1), then copying these tables into yet another page where I mash them together to get the 'flow' of our customer base over time and generating charts from there. Needless to say, it seems a whole lot more clunky than it should be, and I'm having a hard time searching the innarwebs for similar examples (even though I'm sure it's been done before). Example:
I have the data in
A1=30 and B1=40
A2=60 and B2=20
And I also 2 small Pictures ie picture1 and picture 2 which i insert in same excel sheet. I wanted to lookup C1 cell , if A1 is greater than B1 then Picture1 or vice versa.
I currently copy/paste sports data from the web into MS Excel. One of the columns pasted contains "Won-Loss", which appears as '1-0' on the web. However, once the data is pasted, Excel identifies this field as a date and changes the value of '1-0' to 'Jan-'00. I would like to insert a new column and convert the field back to text (i.e. Jan-00 to 1-0). I have attempted several formulas, however no luck as of yet.
View 9 Replies View Related