Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
New to forum and VB in Excel. Managed to complete a few VB items, but
the code evades me on this post (which is best viewed in fixed font). I have spreadsheet like so: A B C D 1 Descrip Rate Factor1 Factor2 2 doors 6.189 99.912 99.102 3 doors 6.256 99.987 99.110 4 doors 6.300 99.999 100.013 5 doors 6.310 99.999 100.086 6 doors 6.325 100.089 100.101 7 doors 6.404 101.025 100.488 8 doors 6.428 101.243 100.621 9 doors 6.501 101.478 100.736 10 trim 6.199 99.909 99.987 11 trim 6.208 99.910 99.996 12 trim 6.225 99.997 99.999 13 trim 6.318 100.014 101.045 14 trim 6.376 100.087 101.134 15 trim 6.401 100.133 101.222 and so on..... Assume: The worksheet is *sorted* on Column A-Descrip (text), then Column B-Rate (numeric only) [which coincidentally leaves Columns C & D sorted]. Column A contains a variety of unique descriptions but there are *many instances* of the descriptions. Values in Columns C & D-Factor are numeric only. Column E begins empty. The routine starts as so: 1)- Search Column C for the first value 99.999 2)- then take the value of the cell that is one cell to the left (meaning the value in same row, Column B) and multiply it by the value in workbook: YearRate.xls, absolute cell ref $A$4 and place the result in active worsheet, same row, Column E, 3)- then, move to next row down and using the value in Column B on the now current row, multiply it by the value in workbook: YearRate.xls, absolute cell ref $A$4 and place the result in active worsheet, Column E, of the now current row 4)- then, using current row as starting point, search Column A until the contents of Column A change 5)- then, on the row where Column A contents are different than previous row, start at step 1 6)- do this until Column A is empty In this example, use the value of "1.012" as the value of $A$4 in YearRate.xls. Only the following cells would have these results in the active worksheet: E6 = 6.401 E7 = 6.481 E13 = 6.394 E14 = 6.453 Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I can still select & manipulate locked & protected cells in '07 | Excel Worksheet Functions | |||
Manipulate a Range | Excel Discussion (Misc queries) | |||
search within a range of cells? | Excel Discussion (Misc queries) | |||
how do you search a range of cells... | Excel Discussion (Misc queries) | |||
Can Range.Find search a Cells' Text property? | Excel Programming |