Posts by neildeilyo

    I have the following code, which I would like to expand. I would like the data to be filtered down to anything that starts with the letter F in column 113 and certain things that start with the letter V. I would like to expand upon this, to include a list of about 23 allowable criteria that start with V, but I am already running into roadblocks.


    Any clue how to solve this?




    Moderator note: Please take a moment to review the rules regarding the use of code tags. I have added them for you this time, please use them in the future.

    I have the following which I am using to remove all rows of data where the name in column DX is not a specified name.
    The code will sort through all rows and delete each row that doesn't contain that specific name.
    The problem is, it is way too slow. Any thoughts?



    Moderator Note:
    Code tags must be used when posting code.
    I have added them for you this time, please use them in the future.

    Re: Applying VLookup in VBA to Filtered Data


    Adrian, this worked great, I just changed it a bit so it wouldn't apply worksheet function to the first cell, but rather actually set in the formula for the vlookup into the first cell and then autofill with the formula, otherwise everything would have the value the function would calculate for just the first cell.
    Thanks for the help; this is very useful!!

    I had a code to prompt for two different inputs to search another sheet and the delete the entire row if two conditions where met (entry ID $ and date). I adjusted this to re-select the data worksheet, because it was originally also deleting the actual row of the worksheet that this button was located in.
    I think the Date Input is no longer applying properly now. Anybody have any ideas?

    I am getting an error when trying to run a macro which should filter my data based on the date in Column AN. I want this to be date dependent, so it should filter everything from 2 months prior to today's date in time.


    Code
    Sub Move2017()
        Macro 2017 Clear
        Dim DQ As Date
        DQ = dateserial(Year(Now), month(Now) - 2, 1)
        Range("A1:AZ100000").AutoFilter field:=40, Operator:= _
            xlFilterValues, Criteria2:=Array(1, DQ)
        End Sub


    I keep getting the following error:
    "Compile Error: Wrong number of arguments or invalid property assignment"
    Any thoughts on how to solve this?

    Data from two worksheets needs to be regularly compared andthe monthly comparison needs to be automated. I have two sheets in thisworkbook. I need a third tab with a macro button which can compare the twosheets, titles “Restated Data” and “Location File Data” each month. Data forperson rows spans 2017, 2016, 2015, 2014 and 2013. The real data set is muchlarger.
    On each tab, there are person ID numbers and month’s ofentry, in columns A and AN, respectively. There are multiple entries on eachfor each person # and month combinations. “Location File Data” will be ultimatelyuse. The comparison sheet, the third sheet, should list all row of data inRestated Data, but not in Location File data. The rows will eventually be addedto Location File data. Also, all rows that are not in Restated data, but inLocation File data, will need to be removed from Location file data. The thirdsheet should list all cases of both scenarios. The next macro button will thenadd the rows to Location File data that need to be added, which are inRestated, and remove from Location File Data those which are not in Restated.The tricky part is two fold:
    - New data will need to be added at the top,corresponding to the year grouping it pertains to. If data for 2017 stops androw 3000 on Location File Data tab and a row for 2017 needs to be added, itshould be added at row 3001, not at the end of the data. Formulas will be incolumns AO to AA, and will need to be dragged down to apply to these new rowsadded, and only the new rows.
    - Going forward, current month data will be inRestated, previous month’s in Location, so all data in Location File Data willbe clear from column A to Column AN for 2017 ONLY (February), and replaced with the corresponding data from Restated(March here). Next month I will replace March data with April month end datathen so on. This needs to be a monthly repeatable process. Again, new rowschanged in Location File Data tab need to be at the same consistent groupinglocation and not added at the end of the sheet.

    I need to write a macro that will take anything entered in column A of a worksheet titled Forecast, Range (A9:A200), and have it automatically entered onto the ccoresponding cell in column A on a worksheet titled Realized, range (A9:A200). But I have column A on Forecast filled with formulas dependent on other cells. So people will not be entering into Column A, but rather filling in J and K, which will populate column A. So when something pops up in column A, I want it to move to the Realized sheer as well.


    I apppreciate your help.