% Calculation With Values Depending On Size..
Jan 12, 2010
There is a data range in the E + G columns. The content of the E column can be 5 different items with variable GROSS weights in the G column:
.........E..........G..........R...........S...........T
1.....Size.....Gross....%.........Net......Size
2.....200 g....138......56.52...20........45 g
3.....100 g.....84....................35......100 g
4......45 g......52....................60......200 g
5.....500 g....253...................124.....500 g
6.....Strip......15.......................7........Strip
7.....100 g.....90
8.....500 g....280
9......45 g......62
10........................
View 2 Replies
ADVERTISEMENT
May 30, 2014
I am trying to auto size cells depending on the lenght of the data in them. I have added some code in the work book on the attached file, this works on cell that i maunally add data to any where on the active page (template) but the cells that are auto updated with currencey data dont expand?
If you double click column H a list appears select a test and this auto populates the charges accociated with it
Is there a way to do this as it just fills with #### ???
The code in this workbook is below
[code]
Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
Dim actCol, curCol
[Code]....
View 2 Replies
View Related
Sep 3, 2007
When a number is entered in cell S3, it triggers formulas throughout the worksheet to populate the it with information from another sheet. If the length of the text in B6 is greater than 80, the font size for B6 only should be 8; if the length of the text in B6 is less than or equal to 80, the font size for B6 should be 10. Regardless of the length of the text in B6, the font size for the rest of the sheet should not be changed.
I tried the following
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address "$B$6" And Target.Count > 1 Then Exit Sub
Dim cnt As Long
cnt = Len(Cells(6, 2).Value)
If cnt > 80 Then Cells(6, 2).Font.Size = 8
ElseIf cnt < 80 Then
Cells(6, 2).Font.Size = 10
End If
End Sub
View 9 Replies
View Related
Sep 13, 2005
Is there a way to control the vertical size of a textbox, so that we could type in a List of Instructions to our operator, and the textbox would resize depending on the numbers of instructions in the box. Also the items in the cells beneath the textbox would need to move down, to allow for the resized textbox.
View 3 Replies
View Related
Feb 14, 2013
I have a rather large spreadsheet that takes a long time to calculate. One sheet has the data (about 2800 rows by 650 columns), with samples in rows and data for each sample in the columns. A second sheet has functions to group the data according to predefined patterns. That second spreadsheet is about 800 columns wide and as many rows as I need it to be, as the samples don't need to be analyzed all at once.
Ideally I would like to do all samples at once by making the second spreadsheet 2800 rows high, but the calculation time is just way too long. And there's the problem. The calculation time seems to increase exponentially with the number of rows I calculate at a time. I ran a few tests making it different sizes, and here are the results:
rows
time(seconds)
100
3.5
150
12
200
23
[Code]...
I tried both HLOOKUP and INDEX/MATCH functions and it didn't make a lot of difference. These numbers are for INDEX/MATCH.
Graphing these numbers show that it follows an exponential curve pretty closely. What is interesting is that the progress indicator at the bottom of the screen finishes in a few seconds, about 5 seconds for 350 rows, and I can see the new data after those few seconds. But then it sits and appears to do nothing for the rest of the time. So, for 350 rows, it looks to be done with the calculations within 5 seconds, but then it freezes for another 2 minutes with CPU usage maxed out before I can do anything with the program. That actual calculation time seems to scale linearly with the number of rows I calculate, but the time after it finishes calculating before it finishes whatever else it's doing scales exponentially.
The spreadsheet does have a macro and a couple of other sheets and a macro that do some later analysis and I wondered if that had something to do with it. To check that, I created a new spreadsheet and set it up the same as the original one, with the data in one spreadsheet and the INDEX/MATCH formulas in the other. I copied the data over, but setup the formulas new without copying/pasting anything. It didn't make any real difference.
View 2 Replies
View Related
Dec 14, 2012
I'm developing a financial spreadsheet.
I've got a cell "Taxable Income" and another cell "Tax on Taxable Income" in sheet2.
When I enter a value in "Taxable Income" I want "Tax on Taxable Income" to automatically calculate based on formulas in sheet1. I don't know how to get "Tax on Taxable Income" to determine which formula to apply from the different tax brackets.
For example:
If taxable income is <$18201, tax = $o
If taxable income is between $18201 and $37000, Tax on Taxable Income =0.19*Taxable Income
If taxable income is between $37001 and $80000, Tax on Taxable Income =3572+0.325*(Taxable Income - $37000)
The idea behind having formulas in a different sheet is so over time when tax rates/brackets change I only have to change the formulas on one sheet.
I know how to use basic AND, IF statements e.t.c but I can't seem to get the syntax right for this to work.
View 1 Replies
View Related
Jun 29, 2013
Criteria
Column B
Constant
Variable0
Variable1
Variable2
Variable3
2
[Variable2/Constant]
5
123
43
45
76
[Code] ..
This is my table. What formula should I use so that Column B shows the calculation depending on the Criteria column?
View 9 Replies
View Related
Dec 23, 2008
I m trying to write a formula for my financial model. If anyone can take a stab at a solution. I'm trying to write a formula that will equally distribute revenue either over the next 1 month, 2 month or 3 month period depending on size of the deal.
Details:
Sales will fit in 1 of 3 categories. Less than 25k; between 25k & 100k; greater than 100k.
- if under $25K, recognize in next month (month N+ 1)
- $25K-100K, recognize in two equal parts in months N + 1 and N + 2
- over $100K, recognize in three equal parts over 3 months
N + 1, N + 2, N + 3 ...
View 4 Replies
View Related
Aug 16, 2008
I have problems with my userform's listboxes. I have two listboxes, and I want second listbox's values to be dependent on first listbox's values.
And even more complicated, I need second listbox's values to be dependent on values on certain matrix.
In that matrix, row headings are listbox1's values and column headings are listbox2's values. How ever there are blanc cells on that matrix aswell. So if there is a blanc cell(s) on a row which (heading) is selected at listbox1, then I don't want that column (heading) which intersects with the blanc cell to be included to my listbox2 values.
Finally I want to insert the selected values from listboxes and the value from the intersection of those listbox values (headings) on that matrix to worksheet.
I included an attachment, where you can see my point better. However, as you can see, now the listbox values are not dependent on that matrix. Otherwise it is working like I want it to work.
View 11 Replies
View Related
Nov 12, 2009
I'm currently trying to create a rota timesheet which automatically takes shift patterns and deducts for unpaid breaks.
Basically if a shift is less than 4.5 hours long then no break is deducted
If the shift length is 4.5 - 6.5 hours then 15 mins are deducted
If the shift is longer than 6.5 hours then 30 mins are deducted.
View 4 Replies
View Related
Nov 11, 2008
I am filling out an order form. My values are being entered as sizes. I would like to caculate any entery as 1 X the amount of the item, but the entry is for example.. "YS" and not the number 1.
View 4 Replies
View Related
Sep 29, 2009
How can i do sum of the values which are in red color
CODEAMTA1B2C3D4E5F6G7H8
View 9 Replies
View Related
Dec 12, 2011
I am trying to create a chart that would show all of the Amount values for each Size value that is in the example data below. The Size column has fixed values. In my example the values are: .5, 1, 2, 5, 8, 13 and 21. The Amount column data is variable. Any of the static Size values can be associated with many Amount values. I was attempting to have the static Size values on the X (horizontal) axis and the Amount values on the Y (vertical) axis. I would like to have all of the Amount values for each Size value be shown directly above the corresponding size value, in one vertical line. See example below.
I an creating this type of chart in Excel 2010.
Note, I am still new to this forum and don't know how to post pictures or Excel data into my posts. I am also using dots (periods) to provide separation in my examples.
Amount...Size
58.5.......21
1........... 0.5
2........... 1
1.5.........1
27.5.......13
12.5.......5
2............1
3.5.........2
17.5.......8
4........... 2
48..........21
0.5.........0.5
15..........5
11..........2
Chart that I am trying to create. The chart example is not to scale.
...........60.|
...............|..........................................................................*(21,58.5)
Amount.50.|
...............|..........................................................................*(21,48)
...........40.|
[Code] ........
View 2 Replies
View Related
Sep 12, 2013
I have created an excel document with If formulas. If nothing gets entered in that particular row, the row simply says "None". Is there a way to get rid of any row that contains that value by any chance?
Something along the lines of if the row says "None" then that particular row gets automatically hidden? It would probably need to be in VBA?
View 9 Replies
View Related
Jun 25, 2014
Example:
Sheet: Users
Column A has "Yes and No"
Column B has "Names"
ex.
A B
Yes Peter Johnson
No Patrick Andersen
Yes John Smith
Now i would like to create a list in sheet [Employee] where one the users with Yes in column A is shown.
In this ex.
Peter Johnson
John Smith
No need to show yes or no.
View 11 Replies
View Related
Oct 23, 2008
I have a workbook with several drop down boxes and formulas already set up and working. I want to improve it though. My question is.... is there a formula that will make the drop down list change based on a cell value....
For example: If B6 equals vegetables then C6 equals list (potato, carrot, pea, etc.) If B6 equals fruit then C6 equals list (apple, banana, grape)
View 6 Replies
View Related
May 28, 2009
So, I have some names and values. Rank function give me order for those values.
Small function gives me ascending order. I want to get first n (let say 5) values back next to each other but can't use VLOOKUP function because sometimes I get duplicates (red numbers).
If there is more same numbersthat small function returns... It need to give me all of them, no matter 5 is limit. how to get back values of rank function that are duplicated. Book1.xls
View 2 Replies
View Related
Jan 3, 2013
see attached document - this is a stock record sheet. what i want it to do is when Bed is seleceted in column B - i want colum C to show the BedSize list which is in the lists tab. and the same with Chair i want it show ChairSize
View 14 Replies
View Related
Feb 25, 2009
I would like to distribute values in cells depending on the input value (excel file attached). This file is a test and basically i've been entering the data manualy. The format is flexible, so it can be reorganisaed.
View 2 Replies
View Related
Jan 4, 2012
I have some arrays to loop through some code which generates some graphs:
Code:
Sub demo()
Dim aServer
Dim aType
Dim i
aServer = Array("a", "b", "c")
aType = Array("1", "2", "3")
[code]....
I am now trying to populate the arrays dynamically and thought I could work that out myself, but this is my first ever time with VBA and it's not as easy as I thought (Or maybe I'm not as clever as I thought!)
I have a table in a worksheet with column headings and row headings which are the values to be added to the array.
Lets say I have the following:
Column headings = "x", "y", "z" (these are the potential aType values)
Row headings= "1", "2", "3" (these are the potential aServer values)
_,x, y, z
1
2
3
The values in the table are either TRUE or FALSE (Or blank which should be interpreted as FALSE). Where there is a TRUE the column heading should be added to the aServer array and the Row heading should be added to the aType array.
In this 9 cell example (Not counting the row and column headings), if the first 2 rows had all the values as TRUE (See example table below) it would therefore result in the following arrays:
_,x, y, z
1,TRUE,TRUE,TRUE
2,TRUE,TRUE,TRUE
3,FALSE,FALSE,FALSE
Code:
aServer = Array("1", "1", "1", "2", "2", "2")
aType = Array("x", "y", "z", "x", "y", "z")
If the table was as follows:
_,x, y, z
1,TRUE,FALSE,FALSE
2,FALSE,FALSE,FALSE
3,FALSE,TRUE,TRUE
It should result in the following arrays:
Code:
aServer = Array("1", "3", "3")
aType = Array("x", "y", "z")
this would work out how many rows and columns there were based on how many column headings and row headings there were (So I wouldn't have to change the hardcoded VBA when the table grows, therefore making it easier to share the spreadsheet with others)
View 3 Replies
View Related
Jun 17, 2012
I'm looking to get a formula to counting unique values listed in a column depending on a condition also find the attached file for more details
[URL]
View 9 Replies
View Related
Jan 23, 2004
Does anyone know the code to send an email to a set list of six recipients when cells in a certain column in a worksheet reach a certain value greater than another. Let me explain a little - The action to be performed is date-based.
For Example:
When the date cell L2 is 30 days later than the date in K2, send an email with subject containing data from cells B2 and C3.
However, this has to work for columns K and L in their entirety, as both columns contain a list of dates...
View 9 Replies
View Related
Aug 25, 2008
Depending upon a figure entered e.g. = $ 895.00 and also Depending upon a state being entered e.g. = NSW. Then Excel will lookup a series of cells to produce the correct figure depending upon the correct data ciritera being met. I have a data table sitting behind the spreadsheet with all relevant values.
View 3 Replies
View Related
Feb 15, 2010
I have a calculation that returns a result in F25 as a %. depending on the level of percentage I would like cell G25 to return >50% = poor, 50-65=average, 65-75=good and <75% = Excellent with the font being bold, red, orange, yellow and green accordingly.
View 11 Replies
View Related
Jul 29, 2014
I have a spreadsheet where I am trying to quantify which items meet certain conditions.
In columns J, K and L I have dates. Column M is an associated $ amount. Column N calculates the number of days between J and K and column O calculates the number of days between L and K.
I have to get the dollar amount for column N over 45 days and in column O the dollar amount under 120 days.
My formula for column N is =sumifs(M6:M1166,N6:N1166,">45") and for column O is =sumifs(M6:M1166;O6:O1166,"
View 2 Replies
View Related
Jul 24, 2008
I'd like help writing a single formula that assigns either a numerical 1 or 0 to a cell based on values from two other cells.
By way of background, I'm working with three columns. Cells in column F contains values from 1 to 4. Cells in column G contain values from 5 to 11. Cells in column H are currently blank.
I need a single formula that will insert either a numerical 1 or a 0 into column H according to the following conditions.If F3 = 1 and G3 = 5 or 6 or 7 then let H3=1 otherwise let H3=0
If F3 = 2 and G3 = 7 or 8 or 9 then let H3=1 otherwise let H3=0
If F3 = 3 and G3 = 9 or 10 or 11 then let H3=1 otherwise let H3=0
If F3 = 4 and G3 = 9 or 10 or 11 then let H3=1 otherwise let H3=0
View 11 Replies
View Related
Aug 2, 2007
In what would be Cell E2 I want to post the Total posted set Assuming that the Order Numbers and the OP Numbers are the Same, but only if there is a value in the allowed set, So I'd expect E2 in the case below to read 1.83,
Order No OP Posted Set Allowed Set
30761157 00100.731.500
3076115700100.500.000
3076115700100.600.000
3076461000100.000.000
3076461000101.050.500
3076524400100.000.000
3076524400100.550.500
3076639600100.000.000
3076639600101.180.500
3076810900100.000.000
3076862900100.000.000
3076862900100.000.000
3076862900100.000.000
View 9 Replies
View Related
Feb 7, 2007
I’ve done a search of the forum for a macro and found some post that seems to be about what I want to do, but unfortunately my minimal vb experience prevents me from adapting them to my requirements.
I‘ve got a workbook with three sheets; say Sheet A, Sheet B and Sheet C. I want the info in Sheet C copied to either Sheet A or B depending on the info in cells in Column A of Sheet C.
Sheet C contains customer info, there are about 9 column headings and up to 30 000 rows (Individual customers).
The cells in Column A will contain a number between 0 - 23. What I want the macro to do is, if a cell in Column A contains any of these numbers, 0, 1, 2, 6,7,8,9,10,17,19,20,21,22,23, I want that whole row copied to Sheet A and if it contains 3,4,5,11,12,13,14,15,16,18, I want it copied to Sheet B. The cells will only contain one number, never a combination.
View 3 Replies
View Related
Nov 22, 2007
I want to change the colour of a cell depending on its value, when compared to another row of data identiified by a value in another cell. To try an clarify:
b3 = 1 b5=4 Because b3 = 1 then compare cell b5 with the row g1 as b3=g1 then depending on its postion set a colour
g1= 1 g2:g5 = 2,3,4,5,6
h2= 2 h2:h5 = 7,8,9,10
View 2 Replies
View Related
Jan 23, 2007
In my Case Else, I have it set to take the Average of the values in cells M8 for all sheets other than the ones listed in my other Cases, same for M9, etc. for each worksheet I have.
The change I want to make is as follows: I'd like it say say if the value in Cell M8 is the same on all sheets then place x value in cell M8 on the active sheet, same for M9, on so on and so forth. Only if the values in Cell M8 for each sheet are not the same then take the average.
Private Sub CommandButton1_Click()
Dim sh As Worksheet, sum As Double, n As Long
n = 0
sum = 0
Dim arr() As Variant
Dim nbrOfAvgs As Long, i As Long
nbrOfAvgs = 19
i = 0 ....................
View 9 Replies
View Related