• 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.

Extracting specific value from sheet1 and display the entire row in Sheet2

Hi Nebu
When I am implementing the macro in actual data of around 16000 names in the Master sheet. It is checking the existing name in the RawData sheet of the macro which is run before without add the check() code the count was 600. After adding the check() code in the macro and I try to run it again, it gives the code 1 and 2 to the 600 entries which were already there before in the macro. The names which were missing it pulls that as well in the Rawdata sheet of the macro, but from the row 14000 keeping the list of blank rows from 600 to 14000. Any specific reason for it, what am I doing in the mastersheet is filtering it first while adding the below VBA code
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=50, Criteria1:= _
"=New", Operator:=xlOr, Criteria2:="=YES"
After this code it starts checking the un-match name and pastes them in the Macro under Rawdata sheet. Is there anything wrong I am doing here?
 
Hi:

I guess the reason is because you are using tables. I had deleted all the extra rows in the table so that the macro will take the correct count of rows. Other than that I cannot comment more coz you are running some other macro before the check macro.

Thanks
 
Hi Nebu

I think this is the issue with the Table range. Could you please help me changing the below code from table to normal range in the below code.

The dynamic range instead of table.

Sheets("RawData").Range("Table1[#All]").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
Sheets("RawData").Range("S1:S2"), CopyToRange:=Sheets("Filter").Range("B10"), Unique:=True

Code:
Sub FilterData()
    Application.ScreenUpdating = False
    Sheets("Filter").Select
    Range("B10").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Clear
   
    Sheets("RawData").Range("Table1[#All]").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
        Sheets("RawData").Range("S1:S2"), CopyToRange:=Sheets("Filter").Range("B10"), Unique:=True
    Columns.AutoFit
    Range("B11").Select
    Application.ScreenUpdating = False
End Sub
 
Hi:

I won't be able to do this without seeing your excel work book . Can you upload a sample workbook with dummy data filled in for the range you want to change. I would think that there is no need to change the table to a normal range, but again I will have to see your WB before commenting.

Thanks
 
Hi Nebu

It is the same macro which we are working on. The main reason why I am looking to change the table range to normal, because the macro needs to be in shared mode. Since it contain table in Rawdata sheet it won't allow me to share it.

Regards
JD
 
Back
Top