Is there a smart way to: XLOOKUP. If value A is duplicate show next value

MRDBS

New Member
Joined
Nov 7, 2014
Messages
25
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hey

Really sorry if my question has an obvious answer, I blame it on it being really early and my logic engine not yet being fired up.

I am trying to look up next value in an array, if the lookup value is a duplicate to the one above.

I am currently using XLOOKUP to find values in another sheet.
=XLOOKUP(A;B:B;C:C;0) (Simplified)

Now I would like to add an if function,
=XLOOKUP(A2;B:B;If(A2;A1;(C:C)+1;C:C);0)
I also tried:
=IF(A2;A1;(A;B:B;(C:C)+1;(A;B:B;C:C;0)))

I am not sure (C:C)+1 works, do you have an alternative suggestion.

Thank you!
 
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,214,932
Messages
6,122,334
Members
449,077
Latest member
Jocksteriom

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