VBA Extract Highest And Second Highest Values
Nov 27, 2013
I'm attempting to put together a script which in simple terms finds the 'Highest and Second' highest activity and associated FTE for a given sub group.
To be more specific:
On the "Slide 1" sheet look at the values in column J starting at row 7 until blank;For each value, then search the "All Monthly Direct Activities" sheet in column C for the same value, excluding the 'Subtotal' rows;Where a match is found, compare all the values in column E for that sub group;And Find the highest and second highest figure;
Once these are found copy this figure and associated value in column B and paste onto the "slide 1" sheet.
I'm not particularly well versed in writing VB, but I've been working with the code to see if I can get this work, which I have been unable to do.
I have attached a file which may perhaps provide a greater detail than my description of the problem containing the 'Source' and 'Destination' sheets.
View 9 Replies
ADVERTISEMENT
Jan 29, 2012
Is there a way to copy the highest number in every 10 cells of a column list that updates automatically?
For example, the highest number in cells A1:A10, A11:A20, etc?
View 8 Replies
View Related
Feb 25, 2007
I have a list of names in one column and in the next column I have a list of numbers. The names and numbers go together. In anohter cell I would like to extract the highest number and the name related to it. The list changes often.
I would like to be able to put a heading saying that "name" (in anohter cell) made the highest score and the name is entered into a cell automatically.
View 9 Replies
View Related
Jan 15, 2008
If I use =MAX(A1:G1) I get the highest value. Is it possible to show the next highest rather than the highest and if so how?
View 9 Replies
View Related
Jan 28, 2008
I have a column of numbers that I would love it if Excel could pull out the top 3 or 4 highest values from the column.
View 12 Replies
View Related
Jan 16, 2014
I'm recording statistics of sport and since I'm dealing with lots of players (and it's easier to add the statistics in when they're sorted by team and name rather than by highest amount of a stat) I need to have a separate section of the spreadsheet to return the 10 best in a stat.
I've found other formulas but I'm not good enough at spreadsheets to be able to manipulate formulas by adding stuff in so it's been hard to get exactly what I want My problem is that I need this to sort by goals (so most goals first) and then by Games played. Here's an example of what data I'm working with:
Ideally I'd like the list to show all these things (so #1 would be Player N), just sorted by goals and then games.
View 6 Replies
View Related
Oct 1, 2008
extract the highest top 5 values from one column in a filtered table with hidden cells. How can I do this without using advance filter or a pivot table in excel 2003 that will show only the visible cell values and not the hidden cell values
View 9 Replies
View Related
Mar 8, 2014
I have the following 2 formulas that determine the top 2 scores and return the respective headers, but they aren't perfect.
=INDEX(T1:V2,1,MATCH(MAX(T2:V2),T2:V2,0))
The above returns the max, however doesn't take into account scores that are a tie or 0 values
=INDEX(T1:V2,1,MATCH(LARGE(T2:V2,2),T2:V2,0))
The above returns the 2nd highest value, but some instances the output is correct (if there is a tie or a 0).
How can I fix both of these equations and also determine the 3rd highest score?
View 5 Replies
View Related
May 12, 2009
I have 2 columns, A (has the names of employees) and B (has the month in which the employee has a project scheduled). What I’m looking to do is find the latest month an employee has a project scheduled. Note: Employees can have a multiple number of projects so they may be listed multiple times with corresponding months.
I have each employee listed in column F and am looking to find their latest project month in column G. (I have the number that the formula should return in column H).
View 3 Replies
View Related
Jan 29, 2010
I'm trying to let the code described down below to select 10 of the highest values and give them a ranking in the next column using the letters A to J.
My query;
The code gives all 10 of the highest values the ranking letter J instead of A to J, so what's going wrong?
Also, is there a way to simplify this code so it will be easier to maintain and run quicker?
View 6 Replies
View Related
May 13, 2009
what I need for excel to automatically remove the highest and lowest TOTAL POINTS and create an average "Speed Rating" of the remaining 3 scores.
Is it possible to get Excel to do this?
View 13 Replies
View Related
Mar 15, 2009
I have a Pivot Table with 10 columns of data (numbers with a value of 0 to 1000) and a Total per row - all okay (1500 or so records).
For each row, I need to add the highest 3 values from the 10 columns to make a new total. Is there an easy formula I can add to the Pivot to do this?
View 9 Replies
View Related
Feb 24, 2007
Starting at C6 and running down the C column there is a numerical list of values which have been generated from a PivotTable. I'd like some code that will scan down the C column and copy the highest 10 values in that column and the contents of the cell in the corresponding A column starting at F5 and finishing at F15 (a top ten list).
A sample workbook with desired output is included.
View 3 Replies
View Related
Feb 6, 2008
I need a formula that will pull specified information from sheet2 (without having to sort) into sheet 1 by looking up the specified name. See attachd file.
View 3 Replies
View Related
Feb 18, 2014
I have thousands of drawings listed in colums and each in the row has revisions P01 to P10 for Proposal and C01 to C10 For Construction. Is there a way of getting the highest revision of all listed in a row without turning them into numbers when P is older than C , but 1 is older than 10? MAX function doesnt count when value consists of both - number and letter.
Manualy selecting the highes revision will cost me weeks... and brain damage.. as I have thousands of drawings and more are coming...
View 14 Replies
View Related
Jan 17, 2007
I have data in a worksheet coming from an external device that is updated via DDE. The values in the cell change every few seconds. I would like to record the highest and lowest values that these cells contain.
I want the peak values to be stored in other cells.
View 11 Replies
View Related
Jul 10, 2009
How can i make a best XI team from a list of weekly scores in my Fantasy Football league?
Players are as follows:-
One goalkeeper - Top scoring goalkeeper per week
Four defenders - Top four scorers per week
Three midfielders - Top three scorers per week
Three forwards - Top three scorers per week
I need it to find the top scoring players in the above categories and then display them in a specified area.
I also need this to happen for each individual week, NOT cumulative. literally, the highest scoring XI players, as listed above, for the present week.
View 6 Replies
View Related
Jul 7, 2008
I need the close% column to auto sort from highest to lowest so that I can see at a glance who the top sales person is. I have conditional formatting for the top three but I would rather them auto sort by close%, can anybody help me with this. I have attached the file,
View 9 Replies
View Related
Dec 28, 2011
I have a column that updates automatically by placing a value in in the next blank cell in the column. I am trying to write two formulas to identify the highest and lowest values in the preceding 10 cells of each update in the column but seem to be stuck in MIN/MAX/OFFSET hell.
View 8 Replies
View Related
Mar 7, 2013
I have a spreadsheet and on sheet 1 it currently has 45791 rows filled with data and it increases each day.
Each row looks like this
A RACECOURSE
B DATE
C RACE DETAILS
D HORSES NAME
E RATING OF THE HORSE
On Sheet 2 I have 3 columns. These are the list of horses that are running on a particular day.
A DATE
B RACECOURSE
C NAME OF RACEHORSE
What I want to do is to be able to list in columns D,E,and F on sheet 2 the last three ratings the horses achieved from sheet 1.
how to acquire the latest rating of the horse by using the following formula.
=IF(ISNUMBER(v(LOOKUP(9.9999999999999E+307,1/SEARCH(C2,Sheet1!$D$3:$D$45790),Sheet1!$E$3:$E$45790))),v(),"")
This works a treat but for the life of me I can't fathom out how to get the formula to pick the latest three ratings and place them on sheet 2.
I am using excel 2003
View 9 Replies
View Related
Sep 18, 2007
I am currently trying to display a number from a column of data, where the number is the smallest, then the second smallest (third, fourth and fifth where applicable). When using =small, I am able to display the second smallest number, but when the list contains duplicates, the second smallest figure often matches the smallest. I am having the same problem with =large. I have tried to combat this by using an IF statement, but am only able to place so many arguments into the formula before excel is unable to perform the formula. This is also proving quite lengthy :o(
View 4 Replies
View Related
Jun 22, 2012
I've am array formula that I use to provide highest values:
Code:
{=INDEX(Data!$D$2:$D$128, MIN(IF(LARGE(Data!$D$2:$D$128,ROW(A1))
=Data!$D$2:$D$128, ROW(Data!$D$2:$D$128)-MIN(ROW(Data!$D$2:$D$128))+1)),
MATCH(LARGE(Data!$D$2:$D$128,ROW(A1)), INDEX(Data!$D$2:$D$128,
MIN(IF(LARGE(Data!$D$2:$D$128,ROW(A1))=Data!$D$2:$D$128, ROW(Data!$D$2:$D$128)-
MIN(ROW(Data!$D$2:$D$128))+1)), , 1), 0), 1)}
I want to replace the range Data!$D$2:$D$128 with a dynamic reference: like that one:
Code:
ADDRESS(MATCH(Summary!$B$1,Data!$Q$2:$Q$10000,0)+1,
MATCH(Summary!$B$7,Data!1:1,0),1,1,"Data")&":"&ADDRESS(
MATCH(Summary!$B$1,Data!$Q$2:$Q$10000,0)+COUNTIF(Data!$Q$2:$Q$10000,Summary!$B$1),
MATCH(Summary!$B$7,Data!1:1,0),1,1,"Data")
The two formulas work well in separate sheets but crash when put together, how could I possibly insert the second address formula into the first one?
View 2 Replies
View Related
Jun 19, 2014
Trying to arrange numerical values in order from lowest to highest in a column i have a code to do that but i need it to be able to but to a range in the column so it only sorts the values in rows 3 - 60 not all of the rows in the column
Sub Testsort()
Range("A3").CurrentRegion.Select
Selection.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
View 9 Replies
View Related
May 30, 2008
I have imported and filtered a .csv. to specified sheet names. I have rows that have been sorted by a specific column's cell contents. i.e.
A B C C E F G H I
xxx xxxx xxx xxx xxx 1 xxxx xxx xxx
xxx xxxx xxx xxx xxx 1 xxxx xxx xxx
xxx xxxx xxx xxx xxx 2 xxxx xxx xxx
xxx xxxx xxx xxx xxx 2 xxxx xxx xxx
xxx xxxx xxx xxx xxx 2 xxxx xxx xxx
I need to be able to select all the rows or ranges that contain a common value 1's and then loop back and select the next group 2's of rows until the row or column contains "".
View 4 Replies
View Related
Jul 18, 2006
I'd like to have a list printed of all the "qualifying people" found in a range, and then sort their corresponding price values from highest to lowest in Columns A and B. EXAMPLE:
RANGE: D3:D20 - Numerical
RANGE: E3:E20 - Text (names)
RANGE: F3:F20 - $$$
I'd like to search column D for any values of 2 or higher. When it finds a 2 or higher, I want it to find the corresponding name in the SAME ROW in column E, and of course the corresponding price in the SAME ROW in column F. Then I would like only those qualifying people "with value of 2 or higher" to be listed in order from highest price to lowest price in Column A, and B.
COLUMNS
D--------E-----------F---
0-----Mike Bob-----$52.65
1-----Dave Jon-----$42.50
2-----Jane Doe-----$37.65
0-----Gary Lon-----$25.50
0-----Joey Saw----$35.65
2-----Mike Jon-----$35.65
1-----Kate Low-----$38.68
2-----John Doe-----$40.00................
View 3 Replies
View Related
Sep 24, 2006
I need a cell formula that will (a) identify the highest N values in an above specified column range, (b) color the interior of those N cells (I suspect that this is not possible), and most importantly (c) return the average value of N corresponding cells, where the corresponding cells are located on the same rows as the identified N high value cells but in a specified column to the left (not necessarily adjacent)
Does anybody know what this formula would look like?
Example:
-----------------------
...| A | B | C | D | E | F |
-------------------------
1 |....| * |.........| 7 |...
-------------------------
2 |....................| 2 |...
-------------------------
3 |....| * |.........| 6 |...
-------------------------
4 |....................| 1 |...
-------------------------
5 |....| * |.........| 5 |...
-------------------------
6 |....................| ? |...
-------------------------
? = average of B1,B3,B5 where (N = 3) and (specified column to the left = B)
View 4 Replies
View Related
Jun 17, 2008
The aim is to find those combinations of variable values which generate highest total gain. I attached the spreadsheet which shows the variables (A through K) and a Gain column. I created 5 additional tabs which show all possible 2,3,4 and 5-member combinations of the variables. These tabs are like coordinates of which variable combinations should be examined. As an example I used the first combination from the second tab = A and B. If you look at these two columns on the EXAMPLE CALCULATION tab you will see 7,7 in the Number combination which is the first number pair for these two variables. The headings of the red and the yellow columns calculate the total count for this number pair and the total gain. These were recorded on a separate EXAMPLE RESULTS tab along with some other pairs which appear afterwards (these were recorded only from the first 39 rows of the AB data). I need a macro which will cycle through each variable pair (only using the combinations from the tab 2 for now, annd later from 3,4 and 5 tabs) collecting statistics for each unique number combination it encounters (printing to a separate sheet one after one), such as shown on the EXAMPLE RESULTS.
View 9 Replies
View Related
Oct 5, 2013
I am looking for a formula that will find the lowest 5 number group in column A with a total value from column B under $100 in the below table.
1 $28.75
2 $28.00
3 $27.75
4 $24.75
5 $25.50
6 $25.25
7 $25.25
8 $16.50
9 $24.75
10 $26.50
11 $24.50
12 $27.00
13 $26.50
14 $23.50
15 $23.00
16 $19.25
17 $20.75
18 $25.00
19 $20.50
20 $20.50
21 $17.75
22 $22.50
23 $20.50
24 $19.75
25 $20.00
26 $10.75
27 $11.25
28 $5.25
29 $13.00
30 $9.00
View 3 Replies
View Related
Jan 28, 2009
I have a worksheet that contains a number of rows. [Thank you, Captain Obvious!] These rows are logically grouped to represent a series of "items", with each item having one or more rows (with a "header" row at the top). The rows for a particular item represent different types of information about that item, and therefore make use of different formulas based on the row type. Due to the relative complexity of the formulas in these rows, I am creating a series of row "templates" from which I can copy and paste every time I want to create a new item or add rows to an item. As such, I am trying to avoid direct cell references to different rows, as these would easily get messed up during cut and paste. Instead, I am trying to limit myself to various lookup functions (e.g. OFFSET, MATCH, etc...) that will work regardless of where a row is added.
In order to accomplish this I am using a "key" column to group all rows for a particular item together. Until now I have had to type in the key value for every row for a particular item. What I would like to do is to only have to type the key value in the header row, and have a formula populate the key value in all subsequent rows ... until a new header row is reached, at which point the new key value will be used. Take a look at the following example: ....
View 14 Replies
View Related
Aug 4, 2009
I'd like to record the highest / lowest value in a single cell without it being written over i.e record the highest value and if there is another value lower it wont overwrite it.
I've tried using the =max or =min but whenever a newer value appears in the cell it just follows that without keeping the higher value?
View 12 Replies
View Related