Rank using indirect

Peter Davison

Active Member
Joined
Jun 4, 2020
Messages
444
Office Version
  1. 365
Platform
  1. Windows
Hi
I have a range where I want to use a simple rank for the products
Say this -
=RANK.EQ('Unit Sales'!AS6,'Unit Sales'!AS$6:AS$5000,0)
However, I want to use indirect to read The words "Unit Sales" from a cell AN1

When I use the following code it says circular reference when I allow the AS6 to be able to copy down and across
=RANK.EQ(INDIRECT("'"&$AN$1&"'!"&AS6),INDIRECT("'"&$AN$1&"'!"&AS$6:AS$5000,0)

If I put the AS6 and AS$6:AS$5000 in quotes "" it works but won't let me copy down and across

Can anyone advise where I am going wrong?
Any help will be appreciated
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try:
Excel Formula:
=RANK.EQ(INDIRECT($AN$1&"!AS6"),INDIRECT($AN$1&"!AS$6:AS$5000"),0)
 
Upvote 0
Hi Peter,

You'll need to make that first AS6 relative and the range column relative if you want to copy down and across.

Does this work for you?
Note: The first AN3 formula is yours just to verify it worked).

PeterDavison2.xlsx
ASATAU
5DataMore DataYet More Data
61399
7542
82288
91113
1012999
111082
127
13
Unit Sales


PeterDavison2.xlsx
ANAOAP
1Unit Sales
2
36
4
5651
6445
7563
8274
9111
10325
11#N/A3#N/A
Sheet1
Cell Formulas
RangeFormula
AN3AN3=RANK.EQ('Unit Sales'!AS6,'Unit Sales'!AS$6:AS$5000,0)
AN5:AP11AN5=RANK.EQ(INDIRECT("'"&$AN$1&"'!"&CELL("address",AS6)),INDIRECT("'"&$AN$1&"'!"&ADDRESS(6,COLUMN(AS5),2)&":"&ADDRESS(5000,COLUMN(AS5),2)),0)
 
Upvote 0
Solution
This appears to work thank you very much.
I didn't need anything in AN3, wondered why you had the formula in AN3?
 
Upvote 0
This appears to work thank you very much.
I didn't need anything in AN3, wondered why you had the formula in AN3?
Just because I wanted to check the INDIRECT formulae against your fixed formula.
Here it is without that row.

PeterDavison2.xlsx
ANAOAPAQ
1Unit SalesRankingRankingRanking
2651
3445
4563
5274
6111
7325
8#N/A3#N/A
Sheet1
Cell Formulas
RangeFormula
AO2:AQ8AO2=RANK.EQ(INDIRECT("'"&$AN$1&"'!"&CELL("address",AS6)),INDIRECT("'"&$AN$1&"'!"&ADDRESS(6,COLUMN(AS5),2)&":"&ADDRESS(5000,COLUMN(AS5),2)),0)
 
Upvote 0
You've been most helpful and thankyou for such a prompt response really appreciate your time
 
Upvote 0

Forum statistics

Threads
1,215,503
Messages
6,125,179
Members
449,212
Latest member
kenmaldonado

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top