Posts by Max1616

    Re: Looping through blocks of data


    Yep you worked it out yourself!


    Glad my code works!


    Sorry about not diming that as long, I should have done that initially but I forgot to. Let me know if you need anything else!

    Re: Looping through blocks of data


    Try this:

    Re: Macro to Filter/Save As Not Working


    Sorry for the delay. Try this:


    I adjusted some code and your begin row number.

    Re: VBA: adding variable fields to a pivot table


    First question:


    Code
    Dim y as long
    Dim pos as date
    
    
    y = cells(rows.count,5).End(xlup).row
    pos= Cells(y,5)


    I think I'm confused on your second question. If you are adding pivot fields, that would mean each column of data should be it's own field. Are your years seperated out by columns? What does your data set look like and what does the end pivot table look like?


    Thanks!

    Re: Macro to Filter/Save As Not Working


    Caught one more error that is not excluding the hidden cell when copying (sorry I was doing it by freehand before) I just tested this one and it works:


    Re: Macro to Filter/Save As Not Working


    Also you might want to consider changing your end row to be more dynamic to your dataset. I usually use something like this:


    Code
    endrow=cells(rows.count,1).end(xlup).row


    Just a piece of friendly coding advice :)


    I fixed an error in the code, can you try it again?

    Re: Macro to Filter/Save As Not Working



    I think your issue is that your code does nothing with the values that are copied. So you do all of the hiding without actually putting the new values in a new workbook.


    *Edit fixed an error

    Re: Simply-fly Subtotal and add some condition


    Run this, assuming your column headers are in row 1 and not row 2:


    I can't really think of a better way to do this outside of writing 3 separate loops. Which means that this could take a while to run depending on how much data you have. But I am able to recreate your 'result' tab that you provided from the data. (Just remember to delete the first row)


    Please let me know if this worked!


    Sincerely,
    Max

    Re: Simply-fly Subtotal and add some condition


    I think it would be easier for others to help you out if you just gave us a list of actions you wanted a macro for. For example:


    make a macro that does this
    1. Sort Columns A:W in ascending order buy column B
    2. Sort Columns A:W in ascending order by column D
    3. Sort Columns A:W in ascending order by column F
    4. Sort Columns A:W in ascending order by column H
    5. In column A indicate a subtotal at the bottom of the sheet
    6. In column B indicate a subtotal at the bottom of the sheet
    7. In column A indicate a subtotal at the bottom of the sheet
    8. Color the Subtotal cells yellow

    I don't think this is what you want. But something along these lines will help us formulate a Macro to best suit your needs.


    Sincerely,
    Max

    Re: Refresh All Does Not Refresh Pivot Table


    I was having a similar issue, you can create a macro to update all your pivots for you:


    Code
    Dim Sheet as WorkSheet, Pivot as PivotTable
    For Each Sheet in ThisWorkbook.WorkSheets
        For Each Pivot in Sheet.PivotTables
            Pivot.RefreshTable
            Pivot.Update
        Next
    Next


    I think the issue stems from having an older version of excel. (but I might be wrong there)

    Re: Send Email from Excel (Lotus Notes)


    Assuming you are using Outlook:

    Re: Fetching common (common company) data from different worksheets


    Try this:

    Re: Fetching common (common company) data from different worksheets


    Hello,


    This allows you to enter your year range and then it does what you ask:


    Let me know if you have any questions.


    Sincerely,
    Max