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

Macro Help

  • 14-07-2008 9:43am
    #1
    Posts: 5,589 ✭✭✭


    I've crossposted - sorry mods but I posted in the wrong forum first.

    Hiya,

    I have a dataset which has information on firms and shareholders.
    Each firm has a unique ID, however I need to tie this ID in to each shareholder.
    The data is of the form:

    Firm ID Number | Shareholder ID Number |
    00001
    X0001
    X0002
    X0003
    00002
    X0004
    X0005
    etc etc

    where - is a null.

    Is there a macro which will copy down each Firm ID into the nulls until it reaches the next firm ID, and then copies this down?

    Cheers,

    Z


Comments

  • Closed Accounts Posts: 114 ✭✭UsedtobePC


    Provided all your shareholders are grouped together by firm with the first of them containing the Firm ID you could do a loop like this:


    Row = First Row
    First Row.select
    Do While Row+1.value = null OR Row not EOF
    Firm ID = Row.value
    Paste Firm ID in Row+1
    Row = Row+1
    Loop


    Hope it helps


Advertisement