Solved

a different kind of find

Posted on 2015-01-27
4
84 Views
Last Modified: 2015-01-27
I hope there is an expert out there than can provide me with VBA for this.

I need to :

[Look in sheet named Blotter] for the Ref that is in Col 'V' in the Sheet Named TRYCA1 if found, in the same row find the word TICL then step one cell to the right and copy the data from that cell and put that in column 'W' in sheet TRYCA1.
if nothing is found leave cell blank.

so in sheet named Blotter in cell V2 is GSB150139610

try to find GSB150139610 in Sheet named TRYCA1

if found, on the same row find TICL

if found move one cell to the right and copy that cell contents to Sheet Blotter and put result in W2 if no data found leave blank.

Continue to look for all items in column V in Blotter.

File attached
Find.xlsx
0
Comment
Question by:Jagwarman
  • 2
  • 2
4 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40572539
Assuming that the GSB figure is going to be in either column L or M, then

=IFERROR(OFFSET('TRYCA1 '!$A$1,IFERROR(MATCH(V2,'TRYCA1 '!L:L,0),MATCH(V2,'TRYCA1 '!M:M,0))-1,MATCH("TICL",INDIRECT("'TRYCA1 '!" & IFERROR(MATCH(V2,'TRYCA1 '!L:L,0),MATCH(V2,'TRYCA1 '!M:M,0))&":"&IFERROR(MATCH(V2,'TRYCA1 '!L:L,0),MATCH(V2,'TRYCA1 '!M:M,0))),0)),"")

Open in new window

0
 

Author Comment

by:Jagwarman
ID: 40572688
Hi Phillip

Thanks for that but looking at different files it appears they can be in any cell from J to P :-(
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40572713
Then I would like a helper column.

In cell X2 enter:

=IFERROR(MATCH(V2,'TRYCA1 '!J:J,0),IFERROR(MATCH(V2,'TRYCA1 '!K:K,0),IFERROR(MATCH(V2,'TRYCA1 '!L:L,0),IFERROR(MATCH(V2,'TRYCA1 '!M:M,0),IFERROR(MATCH(V2,'TRYCA1 '!N:N,0),IFERROR(MATCH(V2,'TRYCA1 '!O:O,0),IFERROR(MATCH(V2,'TRYCA1 '!P:P,0),-1)))))))

Open in new window


and cell W2 becomes:

=IFERROR(OFFSET('TRYCA1 '!$A$1,X2-1,MATCH("TICL",INDIRECT("'TRYCA1 '!" & X2&":"&X2),0)),"")
0
 

Author Comment

by:Jagwarman
ID: 40572746
wow that's brilliant thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now