Macro Which Ranks Table Of Data
Oct 7, 2008
I have a large table of data which is currently just in alphebetical order. I also have a blank template of the exact table format on another sheet in the same document.
I am trying to create a macro which will pull everything into the current blank table but ranks each row by the overall score (%).
View 3 Replies
ADVERTISEMENT
May 3, 2013
I am building a dashboard for a project, which is going to be on a separate worksheet for easy printing and providing only needed data from my database. I have attached a small example in the format I will actually be using as I think the formula is going to be specific to my dashboard.
Attached file, you should see a column "Rank" highlighted orange, with certain rows being numbered. My objective is to display certain data from that particular row, and display it (scroll to the right to see the dashboard display layout) on the dashboard. I think my main goal is to have the specified data displayed in ranked order 1-10 from the top down, and I don't know where to start with that....the other possiblity is to just have the specified data display in ascending order of the zip codes as long as something other than <blank> is in the "Rank" field.
Example.xlsxā€ˇ
View 1 Replies
View Related
Aug 18, 2014
The situation requires some context. I have a spreadsheet that is pulling data in from another location. It is simply a 'Location!A1' link - the source data updates daily as it is a Business Objects report that I dump out and I want to then bring that info into another spreadsheet.
My challenge is attempting to order the data as it comes in without having to manually sort the Business Objects report everyday. Because the link to the BO report is simply a cell look up, I have to take the data as it comes.
I've tried the rank formula according to a price (as this is what it needs to be ranked by) but because some products are the same price as each other, it simply doubles up (so if there's two products at $10, it ranks them both the same e.g. 4). Once I get the right rank, I can then vlookup the right order in a way I can then reference properly. EXAMPLE 180814.xlsx
View 5 Replies
View Related
Apr 14, 2009
I would like to have a macro to automatically generate a statistics table (on the "statistics" tab) with the 5 following fields:
Fragment names / # samples / # of failed samples / % of success / # of variations in the fragment (SNP). At the bottom of this table, I would like to have a cell with the average % of success for all fragments. The data to generate these statistics are on the "gene name" tab (please note that this name will change every time I will work on a new gene). To make things easier, I think the macro should be run from this tab.
1. The Fragment names are displayed in row #5. I use one column per variation per fragment. If one fragment has 3 variations, there will be three columns and I will merge together the fragment name cells. The fact that some cells are merged can be a problem when copy-paste to the stats table (as I would like to get rid of the merging).
2. # of samples corresponds to the number of cells in blue in column A. The number of samples can change from one report to another but is always constant in the same report.
3. # of failed sequences. In the table, I type "Failed Sequence" (if the analysis has failed) and "Missing Sequence" (if the analysis has not been done). When a sample is failed or missing, it is for the who fragment, no matter how many variation there is in the fragment, so I usually merge the cells of all variations for this failed sample.
4. % of success: this is quite easy #sample/#of failed+missing sequence for this fragment
5. # of variation is equal to the number of variations for this fragment (can be 0, 1, 2, etc.). When there is no variation in a fragment, I put '-- in all cells of the corresponding fragment on the "gene name" tab. Fragment 3 on my file is an example of 0 variation.
View 3 Replies
View Related
Feb 7, 2014
I have a problem ranking a large dataset(more than 30000 rows, 16 different columns need to be ranked). My problem is that I dont want the ranks to have gaps when there are ties.
See how it should be in table below.
Ext P$
Rank
Should be
2,128.34
1
1
[Code]...
I do have a working solution with an array formula similar to this, but it slows down my macro (30 minutes instead of 10 seconds) as I need it to calculate 16 times
Code:
=SUM(1/COUNTIF(A$2:A$35000;A$2:A$35000)*(A$2:A$35000>A2))+1
I was thinking of using a for next loop to rank sorted columns but I dont know how to set it up properly.
View 3 Replies
View Related
May 10, 2007
I have a list of data where some of the cell values are the same. I want to rank them uniquely but when I use the RANK function the cell values that are the same are given the equivalent rank. Is there any way of assigning the equivalent values a sequential ranking that is unique?
So in this example rather than producing the rank as this:
100 1
99 2
98 3
98 3
98 3
97 4
96 5
95 6
It would produce it as this:
100 1
99 2
98 3
98 4
98 5
97 6
96 7
95 8
View 9 Replies
View Related
Oct 22, 2008
i am using this formula with military ranks as the primary value to look up. i know i am doing it correctly because it works with looking up values in another excel workbook when the rank is CPT, PFC, PV2, SPC, SGT, SSG, etc... but it does not work for any rank that is abbreviated with a number as the first character, such as 1LT, 2LT, or 1SG. instead i get a #N/A, which is false. i have looked all over the internet to include this website but cannot find an answer.
View 9 Replies
View Related
Oct 18, 2011
Here is an example of my data and desired results:
A B C
[Material] [Receipt Date] [Order Received (Desired Results)]
1 8/1/11 1
1 8/1/11 1
1 9/1/11 2
2 8/2/11 1
2 8/5/11 2
2 8/5/11 2
2 9/1/11 3
I would like to identify the order in which each "material" was received but I would like the ranks to be sequential.
I am aware of the:
=SUMPRODUCT(--($A$2:$A$8=$A2),--(E2>E$2:E$8))+1
to return the rank but I would like to make them sequential...
One last request... I would LIKE to not use array functions if possible, however I will if I have to..
View 1 Replies
View Related
Mar 16, 2007
On cell K7, i have this formula:
=IF(ISERROR(I7-J7),"",I7-J7)
On cell L7 i have this formula:
=IF(ISERROR(RANK(K7,$K$7:$K$29,0)),"",(RANK(K7,$K$7:$K$29,0)))
The issue is that in cell K7 a dash (-) shows up and ranks this as the number one, even when i have no data in I7 and J7.
MTD Conv
Conv Goal
B/W Goal
RK
-
1
29.3
31
(1.70)
12
21.8
25.0
(3.20)
15
View 9 Replies
View Related
May 15, 2009
I have a sheet diplaying 5 columns of percentages which I need to rank in descending order, i.e. assign rank 1 to the largest percentage and 5 to the lowest. See the attached sheet.
View 2 Replies
View Related
Feb 10, 2014
I'm creating a Speech and Debate calculater that presents winners names by place according to their score. If you look at Tab HSSE Results it will read the inputed information from HS Speech English. I want the names of the students to appear in the correct ranking order in the respected grade rankings chart. I currently have a countif formula which reads the grade, but I think I need to link that with an index formula which I'm having problems with.
View 8 Replies
View Related
Nov 12, 2009
I have a workbook which scores tender's, the calculations behind the front sheet work fine, I would now like to show where the tender ranks against a set of criteria. I have attached a sample and typed into the cell D12 what I am trying to with this list of criteria below starting in cell C15.
View 3 Replies
View Related
Jun 18, 2009
I'm trying to automatize the filling of 4 different tables regarding time (hours , minute)
In other words first i need to select from about 500 products names about 180 products i need. I solved this with an automatic filter like this
View 14 Replies
View Related
Nov 28, 2011
I have a data table which looks like this:
1 2 3 4 a b c
5 6 7 8 d e f
And it should be converted to look like this:
1 2 3 4 a
1 2 3 4 b
1 2 3 4 c
5 6 7 8 d
5 6 7 8 e
5 6 7 8 f
So basically, the data in the last columns should be transposed, and the data in the first columns need to be copied in the cells of the new rows.
View 1 Replies
View Related
Jan 28, 2014
macro to automatically size an XY grid based on user input (see picture - [URL]......)
I want to enter a value in B6 that will automatically create a new grid or edit the existing grid to increase or decrease it depending on the desired grid size.Once the grid has been sized I want to enter a data table into it, therefore the grid would need to be cleared of contents before it could be resized.I think these are the steps that are needed:
- Enter grid size.
- Area (named range based on existing grid values?) is cleared of the data table.
- new rows / columns are inserted with correct XY coordinates shown based on newly entered grid size
- data table written into the new grid
View 5 Replies
View Related
Aug 26, 2009
I’m trying to do is create two tables from data evenly spaced throughout columns A to I. To make the screenshot easier to view I moved the second table under the first. The data is arranged so that each “Subject” has 42 columns and is arranged by “Type” and then by “Subject.”
The tricky part is that the number of subjects will vary so everything has to be done in some sort of loop. From the little I know about VBA I was able to record and edit a macro to add spaces every six rows and average the “MaxResponse.” (that’s what stage the screenshot was taken at) To make the table I think I need to write some sort of Dim statement but that is way beyond my comprehension.
Here is a link to a photo of the table http://yfrog.com/77excelshot3j
Excel 2003
VBA 6.5
Win XP Pro
View 9 Replies
View Related
Jun 27, 2008
I've got a bunch of pivot tables with nothing in their data fields and I want to add two things to the data fields of each, but I keep getting this error as soon as I start my loop:
Run-time error ‘1004’: Unable to get the PivotFields property of the PivotTable class
Here's the code that is highlighted when the error comes up:
ActiveSheet.PivotTables("Master_" & Count).AddDataField _
ActiveSheet.PivotTables("Master_" & Count).PivotFields( Sheets("raw data"). Cells(1 + Count, 2)), _
("Sum of " & Sheets("raw data").Cells(1 + Count, 2)), xlSum
I recorded doing the first one by hand and it looks like this:
ActiveSheet.PivotTables("Master_1").AddDataField ActiveSheet.PivotTables( _
"Master_1").PivotFields("10/2 Spread"), "Sum of 10/2 Spread", xlSum
I don't understand why I'm getting the error because I added watches and my variables are all saying what I want them to say (Master_1, 10/2 Spread)...
View 3 Replies
View Related
Apr 13, 2013
This is the macro I am using
Sub Macro3()
'
' Macro3 Macro
'
Range("C2").Select
Selection.Copy
Sheets("Table").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
[Code] .....
It does everything I want but take F2 info and send it over. But F3-F6 does go over.
View 6 Replies
View Related
Feb 28, 2014
Macro to extract data from cells and populate them into a table. Go to the links below for the images. Why I can't attach images here.
HTML Code: [URL]....
View 2 Replies
View Related
Aug 1, 2014
I have a spreadsheet where I am tracking several entries in a table that will keep growing. Three fields are Data Validation Drop Down Lists. The macro below works well to clear the two lists to the right when the first one is changed by the user.
[Code] .....
I want this to affect the rows below it in the table as they are added.
View 2 Replies
View Related
Apr 4, 2014
I'm having difficulty trying to get the second file appended to the bottom of the 1st imported file. I get "run-time error '13' type mismatch". There is no difference between the two files. I'm thinking there is a problem with my range statement in the second file import, but this range works fine in other macros. Here's my code so far:
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;\server1usersmydataIMPORT1.CSV", Destination _
:=Range("$A$1"))
.Name = "IMPORT1"
.FieldNames = True
.RowNumbers = False
[Code] .........
View 7 Replies
View Related
Jun 11, 2014
I have a leave history report with data for leave taken for the 2014 year. The sheet contains the following headings:
Name; Leave Start Date; Leave End Date; Date Paid; Days Taken; Roundup; Offset
The roundup column rounds the days taken up, for example if someone took 0.4 days off it would round it to 1.The offset column just subtracts the Roundup value by 1 (=Roundup-1) I think we will need this for what I am trying to do.
I have created a new spreadsheet labelled gaant chart, this shows the name of the employee with the working dates for the year and has the following data:
Name
1/01/2014
2/01/2014
3/01/2014
6/01/2014
7/01/2014
8/01/2014
9/01/2014
10/01/2014
[code].....
What I would like for the macro to do is lookup Employee 1 from my gaant chart table and search the leave history data if it finds a relevant start date for the employee it marks that date with a 1, it then looks in the offset column and marks the number of offsets to the right. For example if employee 2 took leave from 1/1/14 to 3/1/14 the macro would mark a 1 on the 1/1/14, and search the offset column which would have 2, it will then mark a 1 in the 2 cells to the right of 1/1/14 also (these being 2/1/14 and 3/1/14)
View 1 Replies
View Related
Nov 28, 2006
The "Sum" sheet can change its number of rows. The pivot table is based on it. I'm having trouble with the SourceData portion of the code in my macro ....
View 9 Replies
View Related
Jun 1, 2009
I have a table of data which represents data in different categories by week.
My ultimate goal is to have another table representing the data for each month - for instance - for each of the categories the data for :
06/04/2009
13/04/2009
20/04/2009
27/04/2009
is summed to make the data for the month of April.
The way I'm doing this at the moment is very long-winded
I'm using a whole new table - the size of the original weekly one - for each month. A calculation decides whether to effectively leave a cell blank or insert the appropriate data based on a date being within a particular range.
So in each "month table" there is the same list of week values:
06/04/2009
13/04/2009
20/04/2009
27/04/2009
04/05/2009
11/05/2009
etc.
but for each "month table" only the cells adjacent to the dates within the relevant month will return actual numerical values within them
This is an example of the forumula I am using in these tables:
=IF(AND(($AD7>=MIN($AE$5,$AE$6)),$AD7<=MAX($AE$5,$AE$6)),$C7,"NA()")
Then a master table sums the totals for each month.
I want to be able to keep this table but get rid of the ones for every month as the sheet is getting unwieldy!
I have tried several times to attach the sheet for clarity but each time upon trying to "Submit New Thread " I am getting page not found errors - the sheet is only 133KB and I have tried zipping and sending also - I can't make it any smaller.
View 14 Replies
View Related
Jun 12, 2013
I have created a table in Excel 2010 (pls see attached table named post.xlsx).
Then copied the above table into PowerPoint 2010, using "paste link" (I tried to attach the PowerPoint file but the system says "invalid file type" and I cannot attach it).
Question:
I have received income data for another month - the new month is 13 and the corresponding new income is 100.
I typed 13 and 100 into the Excel table post.xlsx and thus extended the table by another column.
Then I went back to PowerPoint slide, then right clicked on the table there, then clicked "update link".
Specific Question:
The newly-typed column in Excel table is not get updated in PowerPoint table.
View 2 Replies
View Related
Feb 1, 2010
I have enable Refresh on Open for my excel pivot table, but user need to click "Enable Automatic Refresh" , only solution i came across is to change the registry setting. Which i dont have access to edit registry(admin disable the access).
Alternate solution i try to use Access macro to automate the process and use Outputto save it as a excel file A. Then use excel file B to update pivot table from excel file A.(as excel A data is always latest)
The problem is i will get "....A file name already exist...do you want to overwrite.." prompt.
Which defeat the automate process.
Any other solution to enable the automatic refresh on open the excel workbook?
Or Access can overwrite the exist file or save it as another file name with timestamp ?
View 14 Replies
View Related
Mar 14, 2014
In the attachment you will see an example of what I am trying to accomplish. What I am trying to do is find VBA code that is either specific to this worksheet or in a macro. When the sheet is opened I enter a date in B2. I then enter data into A7, B7, and C7. What I would like to happen is when the data is entered into A7, B7, and C7 the sheet goes and finds the same date that I entered in B2 and copies that data from A7, B7, and C7 into F7, G7, and H7.
View 2 Replies
View Related
Sep 11, 2009
Is there a function to convert the data shown in table 1 to table 2 without rearranging the columns and rows? because i don't want to use TRANSPOSE. I want a function, somthing like SUMIF with OFFSET or INDEX and MATCH or any other function.
Table 1
Team 1Team 2Team 3Team 4Team 4Team 5Team 5ABABCity 12531642City 231173705City 367891125City 436251348
Table 2
City 4City 2City 1City 3Team 4BTeam 2Team 5ATeam 4ATeam 1Team 3Team 5B
View 2 Replies
View Related
Mar 13, 2013
Table 1
January-12
February-12
March-12
Table 2
Sr. No
Name
Dep
Lates
CL / SL
AL
Lates
CL / SL
AL
Lates
CL / SL
AL
[Code].....
View 1 Replies
View Related
Jun 2, 2013
I created a lookup table that works quite well. It even has if statements in the LookUp Formula. However, I have to update the table it pulls the information from each day. I wind up recreating the range each time because the table always has more rows each time. Is there a way I could just paste the table in each day and not have to change the range? The columns never change.
View 9 Replies
View Related