Extracting 2 values in a list in one condition, and 1 in another condition

rizzo93

Active Member
Joined
Jan 22, 2015
Messages
299
Office Version
  1. 365
I have a list of names on one Worksheet B that I want to display two at a time on Worksheet A...but with a twist.

Each name belongs to a group, and because the number of names isn't always even, they can't always be shown in pairs. So I need help finding a way to only show the last name in the group and NOT display the name in the other group when that condition applies.


Worksheet B:

A
B
1ClarkMarketing
2LoisMarketing
3FrankMarketing
4JoeyAccounting
5SarahAccounting

<tbody>
</tbody>


So on Worksheet A I want to show...


Clark
Lois


...as the first pair. When I click my spin button, I then want to show just Frank because he's the last person in Marketing but NOT Joey because he's in Accounting.


Click the spin button again and I want to show Joey and Sarah, both from Accounting. And so the variation continues with names and departments.


Here are the details:


Spin counter cell: P3


N6 is first name
=INDIRECT("E" & 1+($P$3*2))


N7 is second name
=INDIRECT("E" & 2+($P$3*2))

Your help is much appreciated! :)
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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