Macro To Display Top 5 Most Frequently Occurring Part Numbers

Mar 17, 2014

I'd like to create a macro to display the top 5 most frequently occurring repairs on sheet 3 of my workbook. I'd like the macro to analyse all the sheets in my workbook except for the first 3 and then output the results on the 3rd sheet from T50 onward. I have attached a template as an example of how all the sheets in the workbook look (excluding the first 3).

All the sheets have the same layout as the "Survey Template" worksheet.The repairs are located under the Log Book Review of Historical Structural Repair in the Survey Template worksheet and all the repairs are picked through a drop down list that is based on a table of repairs listed in the Parts and Prices sheet within the workbook. I have assigned random serial numbers to the repairs (if that makes it any easier to code instead of locating exact string matches).

I am using a formula that finds the most frequently occuring text from a range of cells that have the text 'Ra' 'Ma', 'Mo' or 'Mi' in them (each cell has a drop down list with these text items only). I am currently using this formula to find which of the four text items appears most frequently in the range:

This formula works fine in a case where there is more of one text item than any other, but when there are two items with the same number of entries, this formula comes back with the item that fulfils the criteria first - i.e. if 'Ra' appears 5 times and 'Mo' appears 5 times, then either could come back, depending on which appears first in the range.

The text items rate in importance with 'Ra' being the most important, then 'Ma', then 'Mo', then 'Mi' is the least important. What I am trying to do is, in cases where more that one text item appears the same number of times, get the formula to display the one that is the most important. So for example 'Ra' will always appear over 'Mo' if both have 5 entries, but 'Mo' will appear over 'Mi' if 'Mo' and 'Mi' both have the most entries.

I have 12,000 rows on my excel spread sheet of data and my average volume for all those days are 17,661,398.6 I noticed that the so called average did not show up not even once in all of the 12,000 rows. Thus I conclude that the average is not normal ? How to find & highlight the most frequently occurring number, the usual, and or the normal numbers?

I have a few columns referencing Crash numbers. The majority of each column is a null value, with about 10-20% of it actually containing the number of a Crash. I want to run one MODE each on a column to see what the most common Crash is.

The following =MODE(Table_X[Crash Alpha])

Results in a #N/A Value Not Available error. What do I need to change to make it work on the column with some nulls and some numbers (no strings)?

As a secondary question, if I wanted to apply a date filter (the columns are part of a table, including a Date column) like the below:

so this gives a part number depending on what number is placed in O6. What I need to do know is look at 2 different cells and for each combination of numbers give a different part number. so if A1 is 2 and B1 is 3 give a certain result.

I have 2 basic parts to a Macro which need to be separated by a pause of 1 second, before proceeding to the next part of the macro. Then pause for 1 second, and loop.

Application.Wait is no good to me as the spreadsheet must remain live, editable, and receiving updates from an external program linked via DDE. Below is the ...

I am trying to do a VLOOKUP on a worksheet with a list of our Part numbers. The Part numbers begin with zero and go into the alphabet with anywhere from 3 digits upto 18.

When I sort the sheet Excel sorts the numeric by the number of digits in the number AND totally ignores the first zero. I can not format as numbers since again Excel drops the first zero. Therefore, when I do the VLOOKUP it will not look through the entire numeric list for the higher digit numbers. Is there anyway to resolve my VLOOKUP issue with indexing or?

I am trying to find a way to eliminate endings off of part numbers.

Below are the list of endings that I need to be eliminated from an extremely long list of variant part numbert. This list below may need to have additional endings added, but nothing will be removed. Please see attachment for example of part numbers that need below endings eliminated. Thanks!

R T G4 E4 RG4 RE4 TG4 TE4 G6 E6 RG6 RE6 TG6 TE6 /2K5 /3K /250 /500

I am trying to count how many orders have Part numbers A and B on the same order. If order 123 has part number A and B on it then return true or else false. I think Match and array might be a way to go but I am still not able to come up with the result.

Im using a formula to identify new part numbers. The formula is: =IF(ISNUMBER(MATCH(A217,Existing!A:A,0)),"","NEW"). However you can clearly see from the attached that if has flagged a duplicate part number as new. Why would it do that? Check out A1368 in existing and A217 in new.

I'm trying to run a script from a CAD software which exports property values into an Excel spreadsheet. I need to then sort the spreadsheet by part numbers (which are located in column G) but my script is not working correctly. My data range is A1:G50.

I have a fairly large list (1200 rows) of part numbers that I would like to sort. The part number has text and numbers, with a number in the middle. I need excel to ignore this middle number when sorting (but not any of the other numbers). Excel currently sorts like this:

The first few letters in the part number or the numbers at the end aren't consistant. But it's always the numbers after the "/" and before the "-" (where there is one) that I want to ignore.

At the very least I would I need the list in alphabetical order. I don't need the list to be sorted by the "ignored number" at all. Meaning, I would be happy with this result:

I need to remove duplicate Part Numbers where other information in the cells will not match. In the following two examples, the only difference is that the COMP_ID: number is different, but for my purposes, the second example is a duplicate and needs to be removed. I have hundreds of rows of this type of information with various part numbers: ...

I have a huge column of data. This data has few prefixes that I need to remove. I have a list of possible prefixes. Some prefixes are 1,2,3 or 4 characters long. Could you please suggest best way of removing these prefixes (VBA if possible)?

Following are some of the examples of prefixes: AB GD KR BCD FP- TJ- W

I have a list of part numbers and a new drawing number and old drawing number. I'm am trying to put this list on the second page of a workbook and write a code on thie first page that allows a person to enter the part number and the old and new drawing numbers will be displayed.

I have the following Macro which groups same part numbers in an excel sheet and also creating a blank row after each (or set of same) part numbers. Their prices are in the adjacent cells. I want to add the price cells and the total to appear in the blank cell below the prices. I have one part number in Cell say A1, Its price in Cell B1 i have another same part number in A2, its price in Cell B2 (The macro has grouped them together) Now I want to add cell B1 & B2 and the result in B3 (Row 3 is blank, created by a macro after each group of similar part numbers)

This process is to be repeted in the entire worksheet.

Sub InsertRow_At_Change() 'part number Dim LastRow As Long Dim X As Long LastRow = Cells(Rows.Count, 1).End(xlUp).Row Application.ScreenUpdating = False

For X = LastRow To 3 Step -1 If Cells(X, 1).Value Cells(X - 1, 1).Value Then If Cells(X, 1).Value "" Then If Cells(X - 1, 1).Value "" Then Cells(X, 1).EntireRow.Insert Shift:=xlDown End If End If End If Next X Application.ScreenUpdating = True End Sub

I'm working on a long list of cells that have multiple entries of the same part number at different point on the list. I want to create a function that consolidates those part numbers in two columns to the right of the raw count.

I have a Excel 2007 spreadsheet of part numbers and quantities sold. In the spreadsheet we have similar part numbers, but my sumif command is adding these together. the parts are :

0124225031 R124225031

My column of part numbers is formatted as text

My formula is this =SUMIF(Sheet1!H:H,A16,Sheet1!Q:Q) where H is the part number and Q is the quanity

I tried adding a format command in the sumif command, but it returned a 0. =SUMIF(Sheet1!H:H,format(A16,"0"),Sheet1!Q:Q)

better formula and why is excel adding different part numbers together?

i have a spreadsheet with 21,000 part numbers. I am trying to group the like part numbers, then leave a space between the unlike part numbers. right now my spreadsheet has a space between each part number and i want to eliminate that. but also keeping the part's qty, date, etc. with it.

I am trying to filter my excel sheet based on certain digits in a column of part numbers. The part number has 10 characters. I would like to filter it so that all part numbers where the 4th character is the number 5 or 7 is listed and where the 5th character is a zero. (i.e. R4X5831310 is a part number where 5 is the 4th character; I would like the filter to show this part number)

I have a list of numbers in an Excel range. Most of the numbers are the same but some are not. I need a function that will go through the list and return the value which occurs most frequently. (Not the number of occurences but the actual value). I need to do this in VBA.

I have a list of data that is the day of the month(1-31) that an event has occurred. (sample data in attachment) I want to find some way to find when the "hottest" time of the month is when the events are occuring.

how to get the end result. I think for myself a chart of some sort would be good to see visually, or some kind of statistical breakdown.

My only requirement is that the list is always being added to, so the end result needs to be updating with the complete list.

Im not an expert in excel, so the more details on how to do this the better. Even better would be creating it in the attachment, and uploading your version so I can see exactly how you did it.

I am going to be taking this idea and apply it in the same way for day of week (1-7) and time of day.

I am useing Excel 2003 and OPC server client for excel, and i am monitoring 6 values, that are changeing each second. I was trying to make a function to collect this information, so i could form a statistic table, but unfortunally with no success.

I can watch how the values are changeing their numbers, but i cant sotre the values in the rows below. Does anyone know how can i do this