Calculate Differently Based On Value
Nov 26, 2008
I'm selling a product to clients. The first one is $20, and every subsequent one is $10. If they don't order any, I need the cell to read $0. I've been trying to get the IF function to work, and can't quite make it work correctly.
View 3 Replies
ADVERTISEMENT
Jun 8, 2009
I currently have the following in a cell:
=BDH(AHD!A3,"px_last","-5cm","-5cm")
This currently displays as -32 pulling this number out of bloomberg.
I now want to write a formulae in this cell that will display this as 32c if it is negative... and 32b if it is positive.
So if the number pulled out is negative I want it to have a c after it (and please have it delete the minus sign) and if positive, then have a b after it.
View 9 Replies
View Related
Aug 16, 2014
I am looking for a way to get a weighted average to work without the need of helper columns, when my weights are stored in one range, and the actual values are stored in another range, but might not be sorted in the same fashion.
For example; range 1 might be:
Weight
Homework 120%
Pre-Exam 30%
Exam 50%
But the range for student's scores might be in a slightly different order:
Scores
Exam 90
Pre-Exam 72
Homework 1 81
(Note that this is a greatly simplified example and that just resorting would be impractical).
View 5 Replies
View Related
Nov 19, 2012
I have two sources of data (of electricity use) that I need to merge to plot detailed consumption. (Source B below needs to have calcs done on it and then be subtracted from Source A. Trust me, it just does). But their formats are transposed relative to one another, and one takes readings every half hour and the other once a minute. Plus, I'll need to append to the data periodically as more gets generated.
I'd describe my Excel level as "novice plus", i.e. IT- and database-literate but as far as Excel's concerned still trying to fully master pivot tables...
Source A looks like this:
DateMeasured in00:0000:3001:0001:3002:00
28-Oct-2012KWH1091087
29-Oct-2012KWH77878
30-Oct-2012KWH108877
31-Oct-2012KWH99877
Source B looks like this:
Time<More columns> kW_Raw_Data
28/10/2012 00:04<More columns>194.541667
28/10/2012 00:05<More columns>180.32
28/10/2012 00:06<More columns>156.17
28/10/2012 00:07<More columns>157.243333
View 5 Replies
View Related
Nov 4, 2013
I have a spreadsheet with numerous transactions that contain the same name but are often spelled differently or inconsistently. I would like to pull all the transactions with the similar name and in a new sheet, make all the inconsistent ones, the same e.g. (space)mr smith or mr smiths or mr smith's or mr smith would all be mr smith. I am thinking of using the match command as a possibility but want it to repeat each row.
I am attaching a spreadsheet to show the existing table and the desired result which is similar to what I am showing below.
Example:
Existing Names and data
A B C D E
1mr smiths xyz10020%
2 mr smith abc12430%
3mr smith's def20040%
4mr smith xyz7550%
5simon inc zbc14065%
6simon's inc xyz20070%
7simon abc9525%
8shows zbd18045%
Want it to show Names and data:
A B C D E
1mr smithxyz10020%
2mr smithabc12430%
3mr smithdef20040%
4mr smithxyz7550%
5simon inczbc14065%
6simon incxyz20070%
7simon incabc9525%
8showszbd18045%
View 2 Replies
View Related
Jan 18, 2014
I have data spread over several columns and this data is added from different files which has a different format than the one required to be in the Consolidated File.
I get results from a portal for Insurance certification, which has Exam Date, Issue Date and Validity Date which is copied manually and pasted from this file and to my master consolidated sheet...then I have to fetch other details for these certified employees from the HR Database which has the data in different formats...
So have to manually copy the format from the previous rows and then copy to the copied data, since this is done more than once in a day its tedious and time consuming so can this be done with a Macro..
I made my own small code but dont know how to make it act differently on selected columns....
I would select the entire matrix and then want the macro to run differently, taking into consideration the column names
[Code].....
I also need to add a vlookup formula for some column based on the column B's value...
Ex: This is for Col C
[Code] .....
So how do I write the code in such a way that the code acts on its own differently.
View 14 Replies
View Related
Dec 3, 2008
When I step through a macro (sessions) or run the macro seperately, it works as intended. When I have it run off of a worksheet_change it doesn't work. Is there an easy fix for this?
Original
Sub sessions()
Dim a As Integer
Dim x As Long
x = Sheets(1).Range("a" & Rows.Count).End(xlUp).Row
Sheets(1).Unprotect Password:="password"
For a = 2 To x
If Cells(a, "m") = Cells(a, "d") And Cells(a, "m") 0 Then
Cells(a, "f").Resize(1, 6).Select
Selection.Locked = True
ElseIf Cells(a, "m") Cells(a, "d") Then
Cells(a, "f").Resize(1, 6).Select
Selection.Locked = False
End If
Next a
View 9 Replies
View Related
Aug 14, 2013
I am using Excel 2010 64-bit (with SP2 and all other updates installed).
I have a worksheet where some cells have a yellow background, based on conditional formatting of what is in column A. (Note that data in column A changes, so the row can sometimes be yellow and sometimes be white.)
I need to sort this worksheet as follows:
1. By background color, so yellow is on top, white is on bottom.
2. Then, within the yellow rows, data in column J.
3. Then, within the white rows, data in column A.
Currently, I do this manually by sorting the entire worksheet by column A, then selecting only those rows that are yellow and sorting by column J.
Is there a way to combine these steps, perhaps with a macro?
I initially thought to make each "background color" its own table, but since column A can change and thus the background color of a row can change, I need to be able to have rows move from yellow section to white section. I don't think having two separate tables allows that.
View 2 Replies
View Related
Nov 20, 2012
How can I rank with 4 criteria that are ranked differently? (Greater/ lesser etc)
Ranking - Online Spreadsheets - EditGrid
I had a look into this, but I got a bit confused with how isnumber, big, small and rank actually work
Using Excel 2003.
View 2 Replies
View Related
Oct 23, 2013
I have written code that allows the user to open a file. To make things easier I changed the file path to point directly to the folder where all the needed files will be placed. The problem is everyone that will be using this work book map their drives differently. One user may have it as H, and the other as J. Also users can have the same drive mapped but at two different starting points. Ex: H:DataReportsxxxyyy or H:Reportsxxxxyyy this causes the code to crash. Is there a way do default the path so it will not matter how the drives are mapped?
Here is what I am using so far:
Dim filt As Variant ' flit to be used in the getopenfile. variant is need for its multiple
Dim FilterIndex As Integer
Dim Title As String
[Code]....
View 2 Replies
View Related
Sep 27, 2006
I've taken over a spreadsheet and been asked to produce various charts. One chart in particular asks for views of the following (hyperthetical) data from different workbooks on the same sheet
July 06 - 24%
June 06 - 22%
May 06 - 29%
April 06 - 21%
overlaid with this data
April 06 - 42
May 06 - 68
June 06 - 47
July 06 - 55
The problem I'm having is that firstly, the dates are presented the opposite way round, and secondly one set of data is in percentages, the other in basic integers. The spreadsheet data is large, and historically has always been done like this so it's not easy to change the way its presented, but is there an easy way to show it in a combination chart?
View 6 Replies
View Related
Feb 13, 2014
When I publishing from Excel document to PDF it produces differently sized pages as shown in attached. Is there a way I can achieve a same size page view without having to change the font size and page layout of the source Excel document?
View 4 Replies
View Related
Apr 11, 2013
Scenario: Two computers running Windows 7 (64-bit Professional) with Excel 2007, same processor, same hard drive, same memory, same everything except the monitors - see below
Computer 1: HP LA2006x monitor (20" viewable diagonal) @ 1600x900 resolution, 91.79 PPI
Computer 2: HP LA2206x monitor (21.5" viewable diagonal) @ 1920x1080 resolution, 102.46 PPI
We have an Excel spreadsheet that the column widths on columns A through K must equal exactly 6, 1, 6, 1, 8, 1, 13, 2, 8, 1, and 35 respectively in order for the data to be imported into another program. These exact column widths are set on Computer 1 and the .xslx file is saved to a network location.
Computer 2 opens the .xslx file from the exact same network location. The column widths display as 5.86, 0.92, 5.86, 0.92, 12.84; not the exact columns listed above. So if anyone needs to export the data from Computer 2, they have to manually adjust the column widths or run a macro to auto adjust the column widths.
My question, is there anything I can do on Computer 1 or Computer 2 to make it so the column widths are saved and open correctly no matter which one is saving and which one is opening? The 20" monitor on computer 1 cannot display the 1920x1080 resolution... already tried that.
View 3 Replies
View Related
Apr 18, 2013
I am trying to use a macro to move a range of excel tabs to the front of the workbook however some of the tabs could be missing due to no information.
If I simply record the macro by moving them manually if the procedure arrives at one that is missing it would report an error.
So in essence I need it to look for the tab and if its there move and if its not move onto the next until it arrives at the last one.
View 9 Replies
View Related
May 8, 2008
I am attempting to write a VBA function that will add textual formatting to each cell that has content. I am just learning VBA; so far, as an example I have
Sub NewSub()
i = 1
j = 1
Do
Cells(i, j) = "'" & Range(i.j).Value & "',"
i = i + 1
Loop Until i = 40
End Sub
but, as I'm sure you'll notice, it does not work. In essence I want to wrap quotes and follow with a comma each cell that contains any content. The actual content test I haven't gotten to yet.
View 6 Replies
View Related
Aug 5, 2014
I printed my graph after editing it while in normal view. It did not appear on paper like it looked on the screen. I switched to page break preview to see if I could see the problem and noticed that the printed version matched the page break version. I am using text boxes for some of my data on the graph itself, and the boxes, moreso than the bars, appear differently between views. This has never happened before, and I print this graph every month after changing the parameters and data. To my knowledge, I did not change anything out of the ordinary.
View 2 Replies
View Related
Apr 16, 2014
Here's the details:
Same file shared by many users in the office. File is maybe 2200 rows long and 20 columns wide. Last column is a text field where users can explain variances. Cells in the last column are wrapped and the rows auto-fit on the height. Zoom is set at 100%.
One person opens the file and it looks fine on the screen. Print preview also looks fine. File prints out perfectly.
Another user opens the file and it looks fine on the screen. BUT, print preview shows that the bottom line or lines of text is cut off. File prints exactly like the preview showed with clipped text.
Both users can point the file to the same printer, but that doesn't seem to change anything. Still prints with text clipped for one person and perfectly for another...
View 1 Replies
View Related
Jun 27, 2008
I've got a report that I churn out every month that calculates total spend, average daily spend, median, number of people etc and as well as that I have to calculate formulas based on the top 20% and bottom 80% of the data. The attached sheet shows the number of people under different business areas, and costs in descending order.
At the moment I do it manually so I filter for each business area and work out the top 20% of people in range and then work out the number of employees, mean, median and SUM of the top 20% and bottom 80%. Below I have 20 people and I take the top 20% which is 4 and then I work out the Total number of people, SUM and median of the top 20 and I do the same for the bottom 80.
EXAMPLE:
TOP 20%
£1,330.00
£1,070.36
£997.50
£840.00
Employees - 4
SUM - £4,237.86
Median - £1,033.93............................
View 14 Replies
View Related
Dec 29, 2006
I have few x values
I have few y values corresponding to the x values.
How to calculate a x value from given y value based on the above data. I tried linear iterpolation, I am not getting good results.
View 14 Replies
View Related
Aug 4, 2007
I want to apply 4 conditions.
Core ValueCurrent Pricenew Price
a 400
b 600
c 300
d 300
If core value = a then new price should be current *2%, if core value=b, then new price should be current price times 2.2%, if core value = c than new price should be current price times 2.5% and if core value=d, than new price should be current price times 3%?
also would i be able to do a formula if core value is either a or b, than new price should be current price times 2% and if core value is = to c or d, than new price should be current price *3%?
View 6 Replies
View Related
Jan 26, 2008
I am working on a tax deduction formula for payroll. I need 3 formulas. The first formula needs to find two cells that are on the same row based off the employees status and gross income.
View 5 Replies
View Related
Aug 2, 2014
I am trying to pull titles out of a text string but its quite difficult because of how the data was originally inputted. I need titles that appear in the following different formats
" title"
title/
title"
These titles were not inputted consistently and it could show up in the middle or at the beginning. I have attached a sample of the data that i am working with and a sample formula that i was trying to use to obtain my information. The formula that i have is a nested formula of find and mid formula that searches for the text within " ".
View 5 Replies
View Related
May 21, 2014
I have been using Excel for a while but i'm kinda stuck at one point where i have to calculate the sum of the numbers corresponding to the month of the data.
Column 1 has all the dates in different months - in this workbook i've included only jan, feb and mar. The second column has the counts corresponding to the dates.
Now if a user inputs the month (1,2,3) number in F2, then we need to compute the sum of all the numbers from second column corresponding to the month in column 1 and display in cell F4.
View 3 Replies
View Related
Jan 30, 2014
I have 2 tables:
IDTypeValue
1A3
2A3
3A4
4B4
5B3
6C2
7A4
8A3
And
TypeTotal
A
B
C
I need to "total" column to automatically display the sum of the values for the categories A, B and C. Is there a formula I can use for this?
View 2 Replies
View Related
Apr 21, 2009
I`m relatively inexperienced with Excel, searched for a few days and have not been able to figure out how to calcuate this value. I have multiple worksheets to work out financials. I have a separate worksheet with the pricing breakdown based on volume. 2 columns
0 - 99,999 0.05
100,000 - 499,999 0.04
500,000 - 999,999 0.03
1,000,000+ 0.03
On a separate worksheet I want to add I6+I7, depending on the value multiply it by the value in the second column. So if the total is 520,000 then multiply it by 0.03.
View 5 Replies
View Related
Jun 3, 2009
Need to calculate different percentiles based on different grades. how do I put an 'if' loop or anything else that will work for this.
GradeAmount
B23
B22
B35
B36
B48
B49
B510
B511
B615
B23
B37
B614
Need function for the table below
Percentile10%25%50%60%75%90%
B2
B3
B4
B5
View 12 Replies
View Related
Sep 8, 2009
I need formula to calculate a fee based on performance. For example I have 4 unique keys with the following performance:
KEYPerformance
2010,000
2120,000
2230,000
2340,000
I need to work out how I can formula drive a fee calculation based on performance which is subject to different ranges:
KEYMin FeeFee 1Fee 2Fee 3Fee 4
201000.10.20.30.4
211000.10.20.30.4
221000.10.20.30.4
231000.10.20.30.4
For example key 20 has a min fee chargeable of 100, however a fee is chargable based on performance as follows:
Fee Range 10-9999
Fee Range 210000-19999
Fee Range 320000-29999
Fee Range 430000-99999999
So key 20 gets charged 0.1% of amounts between 0&9,999, 0.2% of amounts between 10,000&19,999, 0.3% on amounts between 20,000& 29,999 and 0.4% on the rest.
How can this be combined into a lookup/range/low-high formula to extract the correct values????
View 13 Replies
View Related
Aug 10, 2005
example 1:
This years sales are $3700, a decrease of 11.6%. What would last years
sales be?
example 2:
This years sales are $4500, an increase of 151%. What would last years
sales be?
View 12 Replies
View Related
Aug 29, 2006
I want to be able to calculate a price based on a given quantity. But here is the trick.
Example: Widget comes in cases of 12 at $1.00 per case. If the customer orders 36 widgets, then the cost is 36 x $1.00.
If item A is ordered in quantities less than "12" than there is a 15% upcharge.
Example: Widget comes in cases of 12 at $1.00 per case. If the customer orders 4 widgets then the price is 4 x $1.15
But, if the customer orders 35. Then the first 24 are calculated at 24 x $1.00 and the remaining 11 are calculated at 11 x $1.15.
View 14 Replies
View Related
Jul 17, 2008
I am working on a spreadsheet which has lots of data in it. I have a Column i.e. Checked out and on each cell entered an X Mark indicating that a device has been checked out.
Since this Checked Out Column goes all the way down to > 1000 cells. Is there a way for us to make a formula and calculate percentage based on the number of X's that are entered and tell as that out of 1000 cells, the X's are 65% and so the blank cells would have to be checked to complete the list?
View 11 Replies
View Related