Formula for dynamic column

Mufflon

New Member
Joined
Sep 14, 2015
Messages
22
Hi! I have a problem creating a formula for a dynamic column in my database.

A condensed version of the table below. What I want is a formula that checks if there are any shared ranks (same ranks) withing a segment, and if there is, put a star (*) infront of that rank. In my original table there are more critera than just "Segment", but hopefully any formula that could solve the below table can scale up.

RankSegmentRank Adjusted (DYNAMIC COLUMN)
1ALL*1
1ALL*1
2ALL*2
3ALL3
2ALL*2
1RE1
2RE2
3RE*3
3RE*3

<tbody>
</tbody>

All the best!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hello. Does this do what you want?

<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">C2</th><td style="text-align:left">=LOOKUP(<font color="Blue">COUNTIFS(<font color="Red">$A$2:$A$10,A2,$B$2:$B$10,B2</font>),{1,2},{"","*"}</font>)&A2</td></tr></tbody></table></td></tr></table><br />


Excel 2010
ABC
1RankSegmentRank Adjusted (DYNAMIC COLUMN)
21ALL*1
31ALL*1
42ALL*2
53ALL3
62ALL*2
71RE1
82RE2
93RE*3
103RE*3
Sheet1
 
Upvote 0
Hi Mufflon!

How about the following formula in cell C2 (and pull it down):

Code:
=IF(   COUNTIFS($A$2:$A$10;  A2; $B$2:$B$10; B2) > 1;
       "*" & A2;
       A2)

You can easily adjust for more criteria, or for a bigger range.

Cheers,
Rick
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,052
Messages
6,128,509
Members
449,455
Latest member
jesski

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