Format the values obtained with SORT(UNIQUE(FILTER not entire column

drom

Well-known Member
Joined
Mar 20, 2005
Messages
563
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and thanks in advance!

I have a table with many rows and columns Named Table1

I have named some of this table's databodyrange columns as eg:
  • rcCountry 'This column header is country ans shows Countries
I am using in other tab/Sheet the following formula in order to get sorted and unique non blank countries 'Works FINE:
  • =SORT(UNIQUE(FILTER(rcCountry,rcCountry<>"")))
  • =SORT(UNIQUE(FILTER(rcCountry,--(rcCountry<>""))))
    • Does the same
If the obtained results are in sheet2 range C5: down

  1. How can I format the obtained values not the entire column ?
    1. Is any way of referencing this say new non table as a table or
  2. Is it possible to name this dinamic new array ? without using offset(C5;0;0:Counta(....
Thanks again !
 
Hi drom,

If you only want to add color and formating, I would use conditional formating with custom formula:
Excel Formula:
=AND(ROW($C1)>5,ISEVEN(ROW($C1)),$C1<>"")

*Sorry for the french version
Classeur1
ABC
1Portugal
2Guatemala
3Namibia
4Kazakhstan
5Sri LankaUnique
6MongoliaColombia
7KazakhstanFinland
8FinlandGuatemala
9ColombiaKazakhstan
10GuatemalaMadagascar
11MadagascarMongolia
12ColombiaNamibia
13ColombiaNew Zealand
14New ZealandPortugal
15ColombiaSri Lanka
16Namibia
17Namibia
18Portugal
19Sri Lanka
20New Zealand
21Colombia
22Guatemala
23Guatemala
24Sri Lanka
25Kazakhstan
26Colombia
27Finland
28Madagascar
29Portugal
30Colombia
31Mongolia
32New Zealand
33Kazakhstan
34Guatemala
35Guatemala
36Colombia
Feuil1
Cell Formulas
RangeFormula
C6:C15C6=SORT(UNIQUE(FILTER(A:A,A:A<>"")))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C:CExpression=ET(LIGNE($C1)>5;EST.PAIR(LIGNE($C1));$C1<>"")textNO
C:CExpression=LIGNE($C1)=1textNO


Bests regards,

Vincent
 
Upvote 0
I do no
Hi drom,

If you only want to add color and formating, I would use conditional formating with custom formula:
Excel Formula:
=AND(ROW($C1)>5,ISEVEN(ROW($C1)),$C1<>"")

*Sorry for the french version
Classeur1
ABC
1Portugal
2Guatemala
3Namibia
4Kazakhstan
5Sri LankaUnique
6MongoliaColombia
7KazakhstanFinland
8FinlandGuatemala
9ColombiaKazakhstan
10GuatemalaMadagascar
11MadagascarMongolia
12ColombiaNamibia
13ColombiaNew Zealand
14New ZealandPortugal
15ColombiaSri Lanka
16Namibia
17Namibia
18Portugal
19Sri Lanka
20New Zealand
21Colombia
22Guatemala
23Guatemala
24Sri Lanka
25Kazakhstan
26Colombia
27Finland
28Madagascar
29Portugal
30Colombia
31Mongolia
32New Zealand
33Kazakhstan
34Guatemala
35Guatemala
36Colombia
Feuil1
Cell Formulas
RangeFormula
C6:C15C6=SORT(UNIQUE(FILTER(A:A,A:A<>"")))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C:CExpression=ET(LIGNE($C1)>5;EST.PAIR(LIGNE($C1));$C1<>"")textNO
C:CExpression=LIGNE($C1)=1textNO


Bests regards,

Vincent
I do not want to format the the entire column with conditional formatting
Don't worry, (J'habite à Hendaye)
 
Upvote 0
I do no

I do not want to format the the entire column with conditional formatting
Don't worry, (J'habite à Hendaye)
Hi drom,
Unfortunately formating an undefined range is not possible with regular formula:
Apply Conditional Format to a Named Range
Conditional formatting applied to a named range reverts to an absolute reference? | Microsoft Community Hub
Excel - named range in a conditional formatting formula

VBA could do the trick depending on your needs we could try to look into it.

Bests regards,

Vincent, from Quebec (CA)
 
Upvote 0

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