How do I stop excel from rounding? - excel

I have an excel file that lists a number of items from amazon. It has the name hyperlinked, the quantity, the price, and the price per. I have an item that is $19.98 and comes in a quantity of 5. So the last column should say $3.99 but it just rounds to $4.00
I know its a small difference but there has to be a way to stop it from rounding to 4. When I add decimal places it just gives me $3.996 which is not what I want.

you can use this---> =ROUNDDOWN(19,98/5;2)

Related

Excel formula to calculate the sum of positive and negative change of products

I have excel table in csv with data from monitoring smart shelf. The shelf status is monitored every 2 mins. The data is the table with time status of products at given time during the day. Each column consists of numbers e.g. 1,4,3,2,2,2,0,0 etc. When the number is bigger than previous one (e.g. was 2 and now is 3) it means that someone added the product to the shelf, and when the number is less than previous one, it means that the product unit/s was sold.
Te problem is to construct the formula that will be count quantity sold and quantity added. I think that it should monitor the change of quantity whether is positive or negative and sum each positive and negative change.
I just started learning excel more complex formulas and I don't have any idea how to solve this problem. I count on your help
Sold
=SUMPRODUCT(A1:A7-A2:A8,--(A1:A7>A2:A8))
Stocked
=SUMPRODUCT(A2:A8-A1:A7,--(A2:A8>A1:A7))

PowerPivot displaying rounded result

I have created a PowerPivot Report which contains a Price field and a Sales as well as a Measure column.
Price Column will obviously contain the unit price
Sales Column will give the units sold
Measure Column is the measure of the product.
From this I have a:-
Total Price which is PricexSale and a
Total Measure which is MeasurexSale
In the calculation section I have then worked out a calc which is Simply
Unit Per Thousand:=SUM(Products[Total Price])/SUM(Products[Total Measure])*1000
The issue I am getting is this is rounding it to the nearest 10 So rather than £17.88 it is displaying £17.90. It is set to 2 decimal places already. All the values in the columns are correct to the 2 decimal places. Can anyone assist to get me the correct result and not a rounded result.
It sounds like you need to use the round function in DAX on your measure which would allow you to round the result of the calculation. This being different then setting the field's format settings.
It would be
ROUND(<number>, <num_digits>)
Link to Microsoft site on the function:
enter link description here
Edit:
Then it sounds like you want to use the trunc function in DAX to truncate the number after a certain number of significant digits.
TRUNC(<number>,<num_digits>)

Getting the value of a cell from its relative position

I've recently been asked to create a spreadsheet for work that will return the lowest bid price from any of our suppliers. I got the basic spreadsheet from management and they want me to get it working. It looks like this
I've found the minimum value from the four pricing columns easily enough, but I need to get the vendor id and the deal number and display them on the right side as well, as this spreadsheet could have tens of thousands of entries.
Does anyone know of any method I could use to get the Vendor ID and Deal Number values from their relative position to the smallest price value?
This will give you the lowest price vendor.
=INDEX(B2:Q2,MATCH(R2,B2:Q2,0)-3)
Since Vendor appears three columns to the left of price, you are offsetting match by -3. For bid number you will offset by -2.
However, there is more than one vendor with the lowest price, you will get the one who appears first.

Cannot find Price in Excel Document

I have a list of Stock prices that i have imported into Excel. I wanted to check if a given price would have potentially been reached within the range of the Open Price and the Close price of any given day.
For Example:
The Price I am looking for is 11.98
I Now want to know if within the last 100 trading days of data that I have...how many times the price of 11.98 could have appeared. With the idea that if the Open Price on a hypothetical day was 11.50 and the closing price of the same stock on that day was 12.23, then Hypothetically the price of 11.98 could have occurred). If price i am searching for (in my example, 11.98) could hypothetically have occurred in a day, I will count that as one occurrence...using my example of 100 trading days...then the maximum number of occurrences would be 100 (or once per day). I would like to do this in excel and would like help in what the formula should be. Ultimately, I would like a value representing how many times the price I am interested in has occured. THank you in advance.
Lets assume column A is your date, column B is your opening price, column C is your closing price and the price you are looking for is in D2.
=SUMPRODUCT((A2:A6>=TODAY()-100)*(B2:B6<=$D$2)*(C2:C6>=$D$2))+SUMPRODUCT((A2:A6>=TODAY()-100)*(B2:B6>=$D$2)*(C2:C6<=$D$2))
Now this will not cover case where the opening price and the closing price are both lower or both higher than a trading price occurring in the middle of the day.
NOTE: This assumes that the date in column A is stored in excel time date serial format and is not text. If it is text the formula will need to be adjusted.

Picking top 5 scores from a range

I run a small golf eclectic with excel. One of the things we have is a points system. I would like to get the 5 highest points scored over the season and have them ranked from 1 (being the highest points scored) to 5.
My knowledge of excel "sums" goes only a wee bit further than add and subtract.
Thanks!
If you don't want to change the order that they are presently in you can use the LARGE function. It returns the kth largest value.
Below is a great formula, if you drag it down it will automatically get the second, third and nth largest value from a table of data (in this example the data is between A1 to A10).
=LARGE(A1:A10,ROW(A1)-ROW($A$1)+1)
You can then match the values with names or corresponding data from the tables using the MATCH and INDEX functions. The example below would fetch the name for each value from the second column.
=INDEX($A$1:$B$10,MATCH(cell reference with score or value,$A$1:$B$10,2))
Play around with these formulas, they are very convenient for data m
If you have a column containing the scores, you could add a filter (Data->Filter I think) and sort descending.
Though, if you just have rows that are something like [Date][Person][Score] you'll need to go to another sheet and SUM the scores for each person then sort that... Unfortunately my Excel skills aren't up to par to pull a score for each person like that.
Given a list of numbers in A1 to A10, you can work out their 'Rank' relative to each other by using 'RANK'.
e.g.
RANK(A1,A1:A6,0)
RANK(cell, list of cells to check against, order)
For order, 0 = descending.
From there you can work out which one is first pragmatically.
If you have Excel 2007,
Check that your data is continuous, with no blank rows or columns. Click on your scores and then select 'Data - Filter'
Using the dropdown that the filter creates at the top of your scores column and select 'Number filters - Top ten'
A 'Top ten Autofilter' dialog will be displayed, reduce the show 10 to 5 and then click on OK.
For earlier versions of Excel add a RANK formula in a new column. Be careful as the scores need to be sorted, usually into descending order. If there are any ties, they will be given the same ranking number and the subsequent rank number will be incremented by the number of ties. (E.g. If there are two scores of 2, ranked as 5. The next score will be ranked as 7, not 6)
If you want to use the LARGE Function as described above, make sure you put the same range in the list for each of the LARGE functions. That is, change =LARGE(A1:A10,ROW(A1)-ROW($A$1)+1) to =LARGE(A$1:A$10,ROW(A1)-ROW($A$1)+1) or you will get some strange incorrect results

Resources