Identifying 2 Most Right Columns

Hi,

See attached - a very basic sheet "PastedData".

I have a team of travelling salesmen who go from city to city (!) selling their wares.
The sheet shows the sales for each salesman/woman for each city.
The number of cities will vary - and this is the key to my problem.

Requirement:
I want a second sheet to show the Salesmans Name in column A.
Column C should show the RIGHT most city from the "PasteData" sheet.
Column B should show the second RIGHT most city data.

salesquery.xlsx
Patrick O'DeaAsked:
Who is Participating?
 
Curt LindstromCommented:
Try this one

Curt
salesquery-mod1.xlsx
0
 
Patrick O'DeaAuthor Commented:
Perfect !

And I understand it too!
0
 
Saqib Husain, SyedEngineerCommented:
Curt,

Are you sure that the formula works correctly? The logic is ok but the ranges do not seem right.

The cell B2 refers to PastedData!1:1 where it should have been PastedData!2:2

Correct me if I am wrong.

Saqib
0
 
Curt LindstromCommented:
Saqib,

You're right of course! Thanks for correcting me!

The formula should start with PastedData!2:2  in B2 and C2 before it's copied down as far as required.

The result in the sample is the same but it will need to be corrected to work properly for other data in sheet "PastedData"

Cheers,
Curt
salesquery-mod2.xlsx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.