Solved VBA Code/Formula to find left most value(s) and paste them descending (1 Viewer)

Bean Machine

Member
Local time
Today, 12:57
Joined
Feb 6, 2020
Messages
102
Hi all. I am struggling to come up with a way to do this. I am assuming INDEX may be involved but not 100 percent sure how to pull it off. Basically, I want to check cell "C2" in worksheet "Driver" and based on what the value in cell "C2" is check range "B3:W3" in worksheet "Testing" and for a match (i.e., if "Dude 2" was the value in "C2") then store what column that match was in and check for cells with text in that column and return the left most most value to cell "D2" on worksheet "Driver" and onward for any cells that have values in them (i.e., "3,W,S,F"). Either formula or VBA code would be helpful to get this job done. See attached image for more context.

This is worksheet "Driver"
question2.JPG


This is worksheet "Testing"
question.JPG
 

GaP42

Active member
Local time
Tomorrow, 02:57
Joined
Apr 27, 2020
Messages
338
Unsure as to where the text comes from. Are you expecting Dude 2 row in Drivers to have the value "3(W.S.F)" in cell D3, and Dude 6 row in Drivers to show the value "2(F,W) online" in corresponding cell (column D) where Dude 6 is listed, etc?
It would be helpful to attach a copy of your spreadsheet to work with.
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:57
Joined
Sep 21, 2011
Messages
14,324
Give this a read.
I always have to reread any time I use Index and Match. :)

 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:57
Joined
May 7, 2009
Messages
19,248
see this demo.
 

Attachments

  • testing_ADO_RECORDSET.zip
    20.5 KB · Views: 24

Users who are viewing this thread

Top Bottom