VBA Using Rank Formula?

Mar 9, 2012

here is some code that I have,

Dim zima As Range
Dim Col As Long
On Error Resume Next
Set zima = Application.InputBox("Select column to paste to", Type:=8)
On Error GoTo 0
If zima Is Nothing Then Exit Sub

[code]....

Where in the formula C[-7], I need this to line up with the column that I selected via the InputBox. If I select column L then the -7 needs to change to +2. OR would there be a better way to write the formula in VBA?

View 7 Replies


ADVERTISEMENT

Rank A Value Next To A Formula

Jul 29, 2008

I recently made a formula of net sales contribution (sales per product category/total sales). For weeks 1.2008 to 30.2008. But I have several product categories. I would like near the value of the formula (not in another cell!) to insert a rank of these contributions. I d love to have the rank inside a parenthesis() near the percentage.

Here is the format

NET SALES CONTRIBUTION PER PRODUCT HIERARCHY 239.200740.200741.2007
COM RETAIL MEDIA0,03%0,73%0,22%
DTM STORAGE MEDIA0,00%0,06%0,00%

Of course I dont know how to do it.

View 9 Replies View Related

Rank And Min Formula

Mar 31, 2009

i rank some thing
stock 25
A B c D
rank style qty
1 st1 10 for d i need go to rank 1 first then qty 10
2 st2 5 then 2 then 3 till 25 (stock ) after it comes 0
5 st3 4
4 st4 3
3 st5 6

it can posible with rank and min formula

View 9 Replies View Related

Rank Formula

Jun 19, 2006

I want to find the rank of a year that falls between the start date and end date. For e.g.

Start date : 1/1/2005

End date : 10/31/2014

Target Date: 12/20/2009

Using year(start date)-year(end date), I get the number of years but how to evaluate the answer in a cell to get the result = 5 (my desired answer as 2005 through 2009 = 5 years).

View 2 Replies View Related

Formula To Rank Without Duplicates

Jan 6, 2008

I am using the following formula to rank a list of data:

=SUMPRODUCT(--($A$2:$A$140=A2),--($B$2:$B$140=B2),--(M2

View 9 Replies View Related

Rank Formula Without Counting Zero's

Jan 8, 2008

I would like to rank the values without the Zero's. Something like the example below. Where the digits are being ranked and the negatives without ranking the 0's....

View 9 Replies View Related

Formula To Rank Smallest To Highest?

Apr 3, 2013

a formula to rank a set of data ? The smallest data will be rank 1 and the highest will have the last rank. this range of data has some spaces in between, that needs to be ignored but should not be deleted. I have attached a spreadsheet stating the case.

View 4 Replies View Related

Rank Formula Not Working Properly

Oct 7, 2009

I have a rank formula that is seemingly erroring out on certain cells - indiscriminately. I have tried and tried to figure this out for myself but this is beyond my knowledge.

Only on some cells is the rank not working and returning a "-" (the error result).

I want the rank to use absolute numbers, so that it will rank according to variance or percentage (regardless of +/-). I am also using another cell (R1) to tell the rank what column to use.

As you can see there are a few entries, both + & -, that are not being included in the rank - for reasons beyond me.

View 8 Replies View Related

Ranking :: What Formula Would Be Used To Rank Scores

Jul 31, 2007

what formula would be used to rank scores if you had the following

name score
participant 1 14
participant 2 27
Participant 3 19

to get this result

Participant 2 27
Participant 3 19
Participant 1 14

View 9 Replies View Related

Excel 2010 :: Rank Count Formula

Aug 14, 2014

I have attached an excel 2010 spreadsheet to show the issue.

I was shown a formula to rank a series of numbers =RANK(A2,$A$2:$A$19775,0).

However, the ranking figure that get's generated, appears to be counting the cells or something like that.

Ranking Example.xlsx‎

View 10 Replies View Related

Formula That Will Rank Based On Highest Data

Mar 12, 2014

I am building a football stat database which I am looking to put in an individual sheet which will search the other 20 sheets, collate the information and then display a top 5 ranking in each area. For example, this is our setup for the data:

Screenshot 2014-03-12 21.56.18.jpg

So what I want to to is have a separate sheet which will have a section for say over 1.5 goals %. The formula would go and retrieve all of the % results for each individual team. Then it would rank the 5 best teams and display the team name in the first cell and the % in the other cell.

View 3 Replies View Related

Identifying Varying Data And Rank Formula

Sep 17, 2009

i am trying to work out how to use the rank formula to rank numbers in column B and keep them in unison with Column A.

So Column A has say 5 1's with column B having different scores then continuing under 1 in A is 2 and so on is there a way to continue the ranking formula without manually changing the cell ranges?

so =rank(B1,$B$1:$B$7,1) but can i do that if A =1 and then A=2 etc ?
so if A=1,rank(B1,$B$1:$B$7,1)

View 7 Replies View Related

Rank Calculation (with Correction) In Array Formula

Nov 9, 2007

I'm trying to calculate the sum of rank vlaues in an array formula (required for a Mann-Whitney U-test calc). For example, I have the results of a survey quesiton (1-5 rating) with particpant groups of Sales, Marketing & Other. I want to sum the Ranks of the data points that come from Sales or Marketing (but not Other). The added complexity is in the need to add in the Rank correction value to account for ties.

The conditional arrays are the tricky part. I'm very close, but the array formula is still including the Other values. If I delete those data points the formula works great. For those with strong stomachs, I've copied my latest formula below.

$C$% = "Sales" and $F$5 = "Marketing"...

={SUM(IF('Survey Data'!$D$3:$D$30=$C$5,RANK('Survey Data'!$W$3:$W$30,IF(OR('Survey Data'!$D$3:$D$30=$C$5,'Survey Data'!$D$3:$D$30=$F$5),'Survey Data'!$W$3:$W$30))+(($M115+$N115)+1-RANK('Survey Data'!$W$3:$W$30,IF(OR('Survey Data'!$D$3:$D$30=$C$5,'Survey Data'!$D$3:$D$30=$F$5),'Survey Data'!$W$3:$W$30),0)-RANK('Survey Data'!$W$3:$W$30,IF(OR('Survey Data'!$D$3:$D$30=$C$5,'Survey Data'!$D$3:$D$30=$F$5),'Survey Data'!$W$3:$W$30),1))/2))}

View 9 Replies View Related

Ranking Error :: Formula To Rank Employees

Feb 12, 2009

I had tried ranking formula to rank employees on some cirteria it was working, but if there is any tie between two employees then the next rank is not displaying for example in Ach Rank : rank 5 is missing because there is tie is between two employees is rank 4. Request your suggestion and help on this for overcoming the issue.

Formula used for ranking : =IF(B2>=75%,RANK(B2,$B$2:$B$41,1)-COUNTIF($B$2:$B$41,"

View 9 Replies View Related

Rank Formula Excluding Blank Cells

Jun 4, 2009

I am currently working on a football spreadsheet ranking players based on their fitness performance scores. For example, there are 14 persons on Offensive Line. I need all their test scores ranked out of 14. However, if there is a blank, I still need the test scores to be ranked out of 14.
As of right now, I have cheated, and inputted a random number to bypass the blank:

=IF($G12>10, 0,RANK($G12, $G$12:$G$25,0))

But, this now affects my average of the fitness testing scores for that position. This could be avoided if I could find a way around my first problem.

View 9 Replies View Related

Rank Formula Error With Same Values (Ties)

Feb 22, 2008

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've attached a simple example of the problem.

View 9 Replies View Related

Rank Formula Using Arrays And Dynamic Named Ranges

Oct 13, 2011

I need to rank the top 3 names for each location based on gender (see sample data table below).

My spreadhseet has been setup using dynamic named ranges ("Size", "Name", "Gender", "Location" and "Score") using the formula "Size"=MATCH("zzzzz",'Sheet1'!$A:$A) and then "Name" =OFFSET('Sheet1'!$A$2,0,0,Size), and so on for "Gender", "Location" and "Score".

Is there a way to design an array rank formula using the dynamic named ranges to return the name associated with the highest score for "M"s in location "N"? I want to be able to edit the formula so I can chose which rank to display (e.g. 3rd, 7th, etc).

I've been playing with the following but can't get it to work

{=RANK(IF(ISNUMBER(MATCH(Gener,{"M"},0)),IF(Location{"N"},0),Score)}

NameGenderLocationScoreTimMN89
RebeccaFN45DanaFN85TerryMN15
RachelFN78BruceMN31BryanMS15
DonnaFS80JakeMS67MelissaFS66AdamMS48KateFS90

View 3 Replies View Related

Creating Formula To Rank Certain Cells In Reverse Order

Aug 23, 2012

creating a formula to rank certain cells in reverse order.

Example

Cell Total Rank
B1 = 2456 3
B15 = 2369 2
B30 = 2547 5
B45 = 2141 1
B60 = 2471 4

Rank every 15 cells basically in reverse order.

View 9 Replies View Related

Formula To Rank Text Objects Based On Numbers, Interesting Read

Dec 30, 2008

I'm attempting to create a formula that will find the name associated with a value, and return that name on the same column as that value in a later equation.

OK OK to illustrate it a little better:

There are three people: Bill, Ted, and Andy. Each one is ranked in Points, so my table looks like this:

A B

1 Bill 10
2 Ted 20
3 Andy 30

Later on, I want to rank the individuals based on their score, using a formula. Right now, I can rank the scores based using LARGE(B1:B3,1), then LARGE(B1:B3,2), and lastly LARGE(B1:B3,3). That ranks the numbers in descending columns. However, I want the information to automatically populate the name associated with that particular point total. So, I want the system to know that B1 is Bill's score, and rank it, in descending order, later on in the spreadsheet, with Bill's name.

View 9 Replies View Related

Rank A List Then Re-rank The List While Excluding Certain (or By Criteria) Items

Dec 30, 2013

I'm trying to Rank a list and than re-rank the list while excluding certain (or by Criteria) items

Vendor Co
Cost Fee
Rank

Vertox
500
4

BV
1520
3

[code].....

View 4 Replies View Related

Multiple Ranking: Rank The Values In Column B And Then Rank The Values In Column C

Feb 11, 2009

What I am trying to do is give the rank in column D based on the values in columns B and C. Some of the values in column B will have then same rank, and as such I want to add further criteria on which to rank them. I would first like to rank the values in column B and then rank the values in column C, which should give the rank in column D. For example Dog and Frog have the same value of 400 from the Non UK column. Therefore, rather than having these as both rank 1, I want them to be ranks 1 and 2, so want to add another criteria (UK). As Dog is greater than Frog in the UK (i.e. 10>7), I would like to rank Dog as 1 and Frog as 2. Goat will be ranked as 3 because it had the thrid highest value in the Non UK.

ABCD
1Non UKUKRank
2Cat20055
3Dog400101
4Eel200114
5Frog40072
6Goat30023

View 4 Replies View Related

Sum And Rank

Oct 28, 2009

I am stumped on this one. I a spreadsheet with 5 columns (Quarters, Months, Level or Rank, Name, Sales). I need to have a formula to pull in the new Level 1 (rank) after Q4 sales are summed up across months for each name. See the attachment for detail.

View 4 Replies View Related

RANK Without Zeros

Feb 22, 2009

Is it possible to 'eliminate' the zero values when using =RANK? For instance, if you have data with values from +100 to -100 with some lines have '0' value, can they be ranked disregarding the zeero values.

View 3 Replies View Related

Get Rank From Range

Apr 2, 2009

I have and table that gets the average performance of couriers as a %. so.

courier 1...courier 2...courier 3...courier 4,
98.16.......100...........99.7...........99.72

i want is a formula (hoping note to have to code this) that will show which order these couriers should be ranked in by looking at the range of averages. So courier2(100) would be ranked 1st, courier 4(99.7) would be ranked 2nd etc. the end table will look something like.

courier 1...courier 2...courier 3...courier 4,
98.16.......100...........99.7...........99.72
4..............1...............3................2

View 2 Replies View Related

Rank On Two Different Criteria?

Dec 8, 2012

I have a list of names that come from another sheet. I need to rank these by score and have used this formula:

[Code] ........

These names compete within their class but also within the class I need to consider (rank) a second category for example No or Yes. Also all names could be competing in the Yes category or for example 7 in the Yes and 3 in the NO. This will vary and is based on entry in another sheet.

The format is Class (column B), category (Yes or NO, Column C), Name (Column D), Score (Column S) and Rank (Column T)

If I include an IF statement =IF(S33="Yes", at the beginning of the above formula then I get all the Yes ranked perfectly. Is it possible to rank the others with the NO consideration?

View 4 Replies View Related

Count Then Rank Top 10

Jan 31, 2012

I have a spreadsheet of raw data organised in columns and rows. one of my columns is called SERVERNAME, and each row contains the data about an incident which is related to that server.

What I need to be able to do is to firstly calculate via a formula (cannot be a pivot table) the number of instances of SERVER X, and then I need to be able to rank the top 10 servers for which records have been logged.

As an example here is some raw data:

INCIDENT
SERVERNAME
LOCATION
OS
OWNER

0001
Server 1
Japan
Windows 2008
KERLEJ

[Code] ........

Based on the above data I would like to have an Excel formula that searches through the records (Rows) and determined that there are the following number of instances of servers:

server 1 2
server 2 1
server 3 3

And then a further formula (again I cannot use pivot table) to calculate the ranking:

Server 3 3 - ranked first
server 1 2 - ranked second
server 2 1 -space ranked third

View 9 Replies View Related

Rank Using More Than 1 Range

May 4, 2013

trying to use the rank function but unable to use different ranges, even if I use named ranges

=rank(F1,F1:F30,F50:F60,F90:F115,0)
=rank(F1,F1:F30,F50:F60,F90:F115,0)'

It says entered too many arguments

View 5 Replies View Related

Rank With 2 Variables?

Nov 21, 2013

I have created a sheet (call it sheet2) with 5 columns as per below snapshot. There's quite a lot of data as much as 10k rows.

Rank
Total
city

[Code]....

What am trying to do is create a summary table which shows the top 5 cities per region based on the population. This summary table will be on a separate sheet in something like the table below. formula that can lookup a region say Europe and show the top 5 cities based on the rank already calculated on sheet2 and also show the total in a separate column.

Rank
Region
City
total

1
Europe

[Code] ........

View 9 Replies View Related

Rank The Values

Jul 23, 2006

I have 10 sales figures in C2:C11.

In D2:D11, I want the rank of those values, with one twist.

If the value in B2:B11 is X, then that value is excluded from the ranking.

I am trying to basically do:
=RANK(C2,IF(B2:B11="X",0,C2:C11))

View 9 Replies View Related

Rank Criterion

Apr 9, 2007

I deal with Income statements of varying length. What I'm trying to do is figure out a way to rank only the expenses.

The account names change from sheet to sheet, and the number of accounts always changes.

However, Expenses always START after a cell in the "A" column marked "OPERATING EXPENSES" and always ENDS after a cell in the "A" column marked "TOTAL OPERATING EXPENSES". However, I don't want to rank "TOTAL OPERATING EXPENSES" because it's the sum of all the indivicual expenses.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved