Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

excel macro ( VB )

  • 18-02-2010 11:45am
    #1
    Registered Users Posts: 268 ✭✭


    Hey all,

    looking to use a macro to split data from one large report into smaller groups on seperate sheets based on the data contained in the header colums.

    Ie Cut all accounts with a balance of over €50 and a description of actve to sheet two ( or name of sheet two ie barring )

    so i want to be able to define certain parameters for each split, do i need to write this in VB? or can it be done from the record macro part.

    Cheers


Comments

  • Registered Users, Registered Users 2 Posts: 1,092 ✭✭✭KAGY


    Hey all,

    looking to use a macro to split data from one large report into smaller groups on seperate sheets based on the data contained in the header colums.

    Ie Cut all accounts with a balance of over €50 and a description of actve to sheet two ( or name of sheet two ie barring )

    so i want to be able to define certain parameters for each split, do i need to write this in VB? or can it be done from the record macro part.

    Cheers

    Not 100% sure of what you are trying to acheive
    A simpler way may be to use a Pivot Table which analyses your date and creates a table showing summary values, e.g. account names down the side and balance in the main part of the table. you may need to add an extra column with if statements to create your categories. Check help and post back if you think that this would help.

    You could alway use a simple AutoFilter to show a subset of your data.

    Otherwise in VBA you would need to create a module something like this psuedo code (my VBA is very rusty)
    select Activesheet data range
    For each row in Range
        if Cell(row, 2) > 50 then         (if data is in column 2 i.e. B)
            Activesheet.Select.Rows(row).Copy
            SummarySheet = cell(row,1).value     (if sheet name is in col A)
            Range(sheets(SummarySheet).rows(end)+1).paste
        else if ...etc
        end if
    Next Row
    

    as I said, long time since I used VBA


Advertisement