?
Solved

a different kind of find

Posted on 2015-01-27
4
Medium Priority
?
90 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

752 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