Lookup & Countif formula returning data in incorrect order

gruntingmonkey

Active Member
Joined
Mar 6, 2008
Messages
444
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a formula (as below)

F4 =LOOKUP(2, 1/((COUNTIF($F$3:F3, $C$18:$C$27)=0)*($C$18:$C$27<>"")), $C$18:$C$27)
F5 =LOOKUP(2, 1/((COUNTIF($F$3:F4, $C$18:$C$27)=0)*($C$18:$C$27<>"")), $C$18:$C$27)
F6 =LOOKUP(2, 1/((COUNTIF($F$3:F5, $C$18:$C$27)=0)*($C$18:$C$27<>"")), $C$18:$C$27)
etc...

Where column F is where the calculation is and column C is where a supplier name is.

When I add a new supplier in column C, it adds the new supplier to cell F4 if its not already been selected and moves all the other suppliers down one cell.

What I want is for the suppliers to be static and instead of going into cell F4, it shows in the next cell.

Any help would be great, ta.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi, if i've correctly understood - you can try this which is an array formula and requires committing with CTRL+SHIFT+ENTER

=INDEX($C$18:$C$27,MATCH(0,COUNTIF($F$3:F3, $C$18:$C$27)*($C$18:$C$27<>""),0))
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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