Priority in excel formula

cloud2828

New Member
Joined
Jul 16, 2019
Messages
43
I have a table on "Sheet2" where you input a letter and state where it goes in "Sheet1"; A1, A2, A3 etc. in the first column and the letter goes in the second column. This table accepts duplicates and would look like this:

[TABLE="width: 100"]
<tbody>[TR]
[TD]A1[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]

I would like this to display:
X
X
X

In column A. What I initially did was make a macro to sort the data where the highest priority is at the top and would replace it once it's sorted but this is inefficient since macros take a bit of time to run. The problem is that the formula to display the letter in A1, A2 and A3 is in those same cells, therefore trying to create a condition results in a circular reference. I hope I'm clear on what I'm asking for.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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