Posts by meetmoras

    This is not working


    I have 3 codes in the attached workbook, but its not running to all worksheets



    Not filtering all values - only one first value gets filtered



    1. based on filter criteria array in the same sheet






    2. 1. based on filter criteria array in other sheet


    Code
    Sub Filter()
        Dim Criteria As Variant
        Criteria = Worksheets("Sheet1").Range("A1:A140")
        Worksheets("AP").Range("$A$1:$h$100").AutoFilter Field:=3, Criteria1:=Criteria, Operator:=xlFilterValues
    End Sub

    Hi,


    I have a list of data and from the ActiveCell I want to select till row 2 and delete the rows. (ActiveCell will be in Column A)
    - I have blank rows in between in all columns
    - ActiveCell will be Dynamic in each Sheet


    Need help to resolve


    ActiveCell to Row 2


    I have below code


    Code
    Range(ActiveCell, ActiveCell.End(xlUp)).Select
    Do
    Loop

    Re: Column Numbering


    Thanks much, I am very happy with the code. this is greate














    Hi,


    I am trying new code to number a column based one each change in other cell value.


    Example,


    Column A Column D
    RED
    GREEN
    BLUE
    RED
    GREEN
    BLUE


    The first 3 rows in column A should be 1 and next 3 rows should be 2 and so on as long as the column D value .


    So every after blue in column D, the next row cell in column A should increase by 1 (like +1) till the end of column D.


    Thanks much

    Re: Run the code for all excel sheets




    the code should start from sheet 2

    Re: Run the code for all excel sheets


    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
    ActiveSheet.Select
    Columns("A:B").Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    End If
    Next ws
    '
    End Sub

    Code
    For Each ws In Sheets
    If ws.Name Like"*_VARIABLES"Then
    ws.Columns("A:D").Copy
    ws.Columns("A:D").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
    SkipBlanks:=False, Transpose:=False
    End If
    Next




    'I want to run this code for all worksheets from worksheet name "Template". I am not very sure on this ..


    "there are couple of worksheets before the WS "template" but i want the code to run only next sheets

    Hi,


    I have modified a code to filter data based on the input box, but the Macro is not giving output as expected.


    I dont see an input box pop up to enter the value


    please help


    thanks




    Code
    ActiveSheet.Range("$A$1:$H$30").AutoFilter Field:=2, Criteria1:=inpubox = "Please enter the area"

    Hi All,


    I use TransferSpreadsheet Macro to import data in Microsoft Access from a Excel worksheet. Here the path we give remains constant.


    Now,


    I need a solution for, when the user run the macro - it should ask the user to select the file instead importing from default link.



    Please let me know if any one have any idea on this.



    Thanks much,
    NM