The above code get the top 20 race car drivers, based on their points,from 3 sheets and puts them onto same sheet. Column D on each sheet has their point value.
Ie.
A B C D
1. Jeff Gordon 24 100
2. Tony Steward 20 92
3. Dale Earnhart 8jr. 91
my list will have over 100 Drivers already sorted in decending order by points. What I need to fix, is to select the top 20 drivers and any others who are tied for 20th place.
..Range("A2:D21") 'needs to be dynamic to select the top 20 and ties
the above will only get me the top 20. But if 5 drivers are tied for 20th place then I need then also. Remember the list is already sorted and the points are in column "D" starting in D2 and going down.
However if you get two scores tied, for example 28, 28, 39, 6, using rank the points score for each 28 returns 2 when I actually need it to be 2.5 (Thats 3points +2points / 2).
I'm trying to come up with a formula that assigns ranks to an ascending list of integer values where ties are resolved by assigning tied values the mean of the ranks they would have received if there were no ties, e.g., 117, 119, 119, 125, 128 becomes 1, 2.5, 2.5, 4, 5. (If the two 119s were not tied, they would have been assigned the ranks 2 and 3, yielding a mean of 2.5.) My list looks like this:
I have an eight digit number (a digit can show up more than once) and determine the rank of the sum of each number. I had the ties broken by whatever digit showed up first.
In the following example, June 13th row showed 6 digits tied for second place and the tie was broken by the order in which the digit show up in the range.
On the June 14th row it showed digit 4 and 5 tied with 3 occurrence each (running total for the two days). But digit 4 came in twice that day, and reach a total 3 first before digit 5, but Rank2 shows that digit 5 was ranked first, which should of been digit 4.
I am looking to create a sorted Top 10 list based on certain criteria with ties. For example, I would like to take the top values for White Team with both people with "42" at the top, since they are the top values.
I realize that there are not 10 values in the list above but I truncated the list for space purposes.
I am a meteorologist and I keep track of my forecaster's monthly statistics. One area I track is percentage of warnings issued with desired lead time. I calculate and rank the individuals by percentages.
Example: Forecaster A: 3 of 4 75% Rank 1 Forecaster B: 1 of 2 50% Rank 2 Forecaster C: 0 of 3 0% Rank 3
Or if ties: Forecaster A: 6 of 6 100% Rank 1 Forecaster B: 3 of 3 100% Rank 1 Forecaster C: 1 of 2 50% Rank 3
Is there a way in Excel in case of ties, to award a higher rank (1) to the individual who went 100%, 6 for 6, compared to the individual who also earned 100%, but only 3 of 3.
I have a custom sort order that I use for sorting military ranks in a number of massive spreadsheets I am using. Normally the data we get has a long version for the ranks (column 1) and a rank code (column 2). When the rank code is there it is simple to sort by that column in descending order, but without it I need a custom sort. The problem is there are up to three equivalent ranks at each level across Army, Navy and Air Force as you can see in the attachment.
Is there a way I can set up a custom sort based on both columsn of data but sorting only on the second column. I could do vlookups but there are up to 50,000 rows and I don't really want to keep that formula there, and as I use it across multiple sheets (yes I know all one sheet, but it is segregated data and used in different situations) including a vba written value would have to occur for every row on every sheet - not the best option in my opinion - maybe it is.
I have a list of team members and their scores for team building events. I need to create a list of the top ten scores (including any ties). The list will have to show the top ten scores as well as any additional names whose score ties with one of the top ten scores.
I tried large and also a pivot table using the advanced but cannot get it to show the top 10 unique scores as well as any duplicate scores.
I am trying to use the Large function to pull out First, second and third highest values in an array. problem is with ties and zeros it returns the wrong value.
I'm having problem with ranking results (ascending) with similar values e.g. values 1, 2, 2 and 4 fails by use of Rank-formula (rank: 1, 2, #N/A and 4) as value 2 appears twice.
I have data that has filters and hidden rows and my current formula ranks with ties which is what I want, but I do not want the ranking to skip numbers.
Value Rank Now Rank I want 508 6 1001 1 696 4 704 3 833 2 557 5 1001 1 704 3 508 6
I have a pivot table of values displaying agency's performance based on their sales percentage to target. When the race is 'loose', and all companies are 1 or more percentage point away from each other, I format the values without decimal places. If two agencies appear tied, I add a decimal place to seperate them. Occasionally the race is really tight and I have to increase the format to two decimal places to seperate them. how to do this automatically?
I am having trouble getting my IF statement to test if the cell contains the text "sale" return "X" if not "Y". I need it to search through the text string in that cell and find a certain word, and if it finds that word, retrn a value. I am really having difficulty with is what symbol or function do I use for the logical test? (i.e. =, <>, MATCH, INDEX?)
Attempting to hide columns (of cities) via VBA generates an error when that same city is reselected (either individually, or as part of the group) in the list box, upon clicking the 'Hide' button.
I'm trying to use this Find Method and combine it with a countif or loop. Something that will count a number of occurences of a unique type of character. I'm looking to find all "F" characters in Bold, Italic and Size 16. Here's my find code that I'm trying to use. I can get it to work by itself but not along with a countif or loop.
Sub count_4() Dim r As Range Set r = Range("A1:A6") With Application.FindFormat.Font .Bold = True .Italic = True .Size = 16 End With r.Find(What:="F", LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, searchformat:=True, MatchCase:=True).Activate End Sub
The current spreadsheets add up each persons totals by matching the name in each tab with the name of the person who won the job located in current orders tab.
BUT.....If two salesman pair up on up on a job then the formula doesn't recognise the joint name. eg Gary/paul in row 69 (current orders).
I need the totals to half the job and add it to the salesmans total accordingly. There is no 'Paul Tab' as he is our MD and doesnt have a target.
i have spent 40 hours, and still didn't find a solution. Please help is need it!! example: i have to find all articles with same code (222). first one has Q =100 second one Q=250. soled Q=150 (i am talking about 5000 rows, 400 different or same articles per month- 12 months)
columnA-----columnB---columnC 222 ----------100---------0 111-----------50 333-----------70 222----------200---------200 333---------- and so on first i have to deduct from the first one it finds (max. till 0 ...it can not be negative) ....after finding another one it deducts the rest---it means 50 Is there any kind of formula with this possibility. if it is poorly writen please let me know for more info. i am not an expert in excell, but i have tried variations of sumif, vlookup functions, but i always get stuck deducting the whole Quantity from all of the same (222) articles .
Dim c, DataRow With Data Set c = . Range("A5:A350"). Find(KPI, LookIn:=xlValues) If Not c Is Nothing Then DataRow = c.Row End If End With
Now,If KPI is for example = "Favourite Hotel" and if i have data that looks like :
Favourite Hotel - London Favourite Hotel - Cardiff Favourite Hotel Favourite Hotel - Birmingham
Then it seems to not look be looking for an exact match (e.g. Favourite Hotel) and rather is finding the first item in the list that contains the KPI string (E.g. Favourite Hotel - London).
These are some data that I have ( inputs and outputs). I was wondering if there is anyway to find this equation. I can get more data if that helps in finding the equation.
I have dates in column A (Source Dates) and Column C (Target Dates). All data is formatted as Dates. I want to find which dates in column A have a matching date in column C. When using the find statement within a For Each loop I can not find a date match unless I format the target dates as General. How can I use the Find Statement using dates without formating the target dates as General?
Option Explicit
Dim SourceDate As Range Dim TargetDate As Range
Sub FindTargetDate() Columns("C:C").Select Selection.NumberFormat = "General" For Each SourceDate In Range("A1:A32") 'MsgBox SourceDate Set TargetDate = Sheet1.Range("C1:C7").Find(SourceDate, LookIn:=xlValues)
Private Sub cmdShowdata_Click() Dim Tgt As Worksheet Dim Source As Range Dim wbSource As Workbook Dim cel As Range Dim rng As Range Dim c As Range Dim i As Long Application. ScreenUpdating = False Set Tgt = ActiveSheet Set wbSource = Workbooks.Open("C:Documents and SettingsDesktopStaff Recoed 2") Set Source = wbSource.Sheets(1).Columns(1) With Tgt .Activate 'clear old data Range(.Cells(3, 2), .Cells(200, 5)).ClearContents ' Loop through names in column A For Each cel In Range(.Cells(3, 1), .Cells(Rows.Count, 1).End(xlUp)) If Not cel = "" Then...................
The above vba command which is extract the data from the Other workbooks. It looks for the "Staff 001", "Staff 002"...these parameters to transfer the data to the worksheet. But, the "Staff 001" data must appear twice in each workbooks. If i use the above command, i only can extract the FIRST "Staff 001" average data. But SECOND "Staff 001" average data cannot extract. I know it may be use FindNext method to do this but i am not sure how to write it
i am trying to do a search and i came across this. In the excel file attached you will see 2 column. Now if you take copy and paste "sterling rd" which is standing alone into the crtl F search field. It wont find it.
I have played with the format (made both general), i have CLEAN, Proper the text and tried that didnt work either.
I dont know what else to try. I am working with access, with a much larger list, however the linking to excel wont work and i know there is some difference font or format that i am missing.
There are groups of similar ID numbers in Column J. For a group of similar ID numbers in consecutive rows there is only one row that has a number greater than 0 in its Column L cell and the rest of the cells of Column L for that set of similar IDs is filled with 0s.
First for that unique ID group I need to find out which row is it that has a value greater than zero in its Column L cell.
Then I need to use that value to fill the rest of the 0s in Column L corresponding to that set of Unique IDs.
The process continues with identifying similar IDs in Column J and this time doing the same thing for their Column M. I have attached a sample file that shows the data and how the results need to look like.
giving me a macro to find a word in a sentence by using the "FIND" method. For example I have a sentence say "I am happy" in which I have to search whether any of 2 words say "Happy" or "Sad" is there or not. If the sentence contains any of these words, then that row has to be highlighted.
I can't seem to get the findnext to work. I can find the first instance but none after that. Here's my code.
Dim B As Range Dim SheetNumb As Integer SheetNumb = 1 Do While SheetNumb <= Sheets.Count Sheets(SheetNumb).Select If ActiveSheet.Name = "Page1" Then Exit Do End If Set B = Sheets(SheetNumb).Cells.Find(" Mechanical", SearchOrder:=xlByColumns, LookIn:=xlValues) If Not B Is Nothing Then B.Activate FindAddress = B.Address Do B = Sheets(SheetNumb).Cells.FindNext(B) Loop While Not B Is Nothing And B.Address <> FindAddress End If SheetNumb = SheetNumb + 1 Loop
I am trying to look up a numerical value in Sheet 1 Cell:F7 and find that value in Sheet 2 Column B, then offset 29 columns in the row where the value was found. The number will not have any duplicates within Sheet 2.
After doing a search, I need to ask an Excel 2003 question. I'm creating a tool to open three sparate workbooks. One is the driver and I need to use it to pull data from the second and then to place that data along with additional data into the third.
My driver data may consist of a single value or multiple values separated by semi-colons in a cell. A single value works fine. The first value in a multi-value condition works fine. the second find, however, gives me an object error. I'm using the " split" verb to separate the values. Here's my code. Have you any idea why the second find is throwing up this error when the first find works correctly?
varData = Split(strRef, ";", -1) For J = 0 To UBound(varData)
varSrchVlu = Trim(varData(J)) ' do the ARIS Exrtact matching Workbooks(strManualFile).Activate Workbooks(strARISExtract).Activate ' Activate ARIS Extract Sheets("Processes").Cells(2, 1).Activate Workbooks(strARISExtract).Sheets("Processes").Range("A2").Select Workbooks(strARISExtract).Sheets("Processes").Columns("A:A").Select