• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Eliminate data

Syik

New Member
Hi @Luke M & team
need your help. based on latest macro provided to Dalia (from this thread), can we eliminate/delete data in book2 based on column O (product)? i just want to remain some data in column O(product) that start with alphabet "f" until "p". After that only proceed for vlookup.

Thanks in advance.

Mod Edit: Question moved to its own thread per forum rules.
 
Last edited by a moderator:
Hi Syik,

I think you can achieve what you want by modifying the formula we place, and letting that do the work. In line 29, change the formula line to this:
Code:
    'Apply our formula
   .Range("Q2:Q" & OutputLastRow).Formula = _
    "=IF(AND(LEFT(O2)>=""F"",LEFT(O2)<=""P""),VLOOKUP(A2,'[" & sourceBook.Name & "]" & sourceSheet.Name & "'!$A$2:$B$" & SourceLastRow & ",2,0),"""")"
It takes the first letter from col O and check if it's between F and P. If so, go to the VLOOKUP. THen our filter is looking for #N/A values, so we're covered there.
 
Back
Top