+ Reply to Thread
Results 1 to 4 of 4

Macro to copy name to one of two columns if a seperate cell value is true

  1. #1
    Registered User
    Join Date
    03-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to copy name to one of two columns if a seperate cell value is true

    Hello everyone,

    I am relatively inexperienced to VBA and am in desperate need of some assistance.

    My task is to take a excel worksheet with a list of up to 500 emloyees with various data of each employee (birthdate, gender, department, ect) and create 2 lists dependant on a calculated value.

    The range of my data is A2:AW500. What I need is for a macro to read each row, if column P indicates TRUE, then the emplyee name in column A is copied to the first empty cell in column AX starting at row 2. If column P indicates FALSE, then the employee in column A is copied to the first empty cell in AY starting at row 2.

    I already have the formula in column P working. I just need help sorting the names.

    Once the list is complete, I will name each column to reference them in other worksheets in my workbook.

    Attached is a basic example of what I need.

    Thanks in advance!

    employee sort example.xlsm

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro to copy name to one of two columns if a seperate cell value is true

    Try

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro to copy name to one of two columns if a seperate cell value is true

    Actually use this one.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to copy name to one of two columns if a seperate cell value is true

    Both worked perfect! Version 2 seemed to work a little faster.

    Thanks for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1