+ Reply to Thread
Results 1 to 4 of 4

quick way to fill in corresponding codes in blank cells?

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    Berkeley, CA
    MS-Off Ver
    Excel 2010
    Posts
    9

    quick way to fill in corresponding codes in blank cells?

    Hi all--I'm an excel newbie so having a hard time explaining the things I'm trying to do, please forgive me!

    In my spreadsheet I have many phone numbers, some of which have corresponding codes 6 cells to the right.

    The codes are typed in when the list of phone numbers is filtered for unique values, so after we are done assigning codes, we have to go back in and apply more filters to ensure each phone number has the right code. It takes too much time to filter/copy/paste one by one.

    Could anyone help me write a script that will label the correct codes to the duplicate phone numbers once we are done assigning the first case of that phone number?

    I've attached a dummy file so you can see what we are trying to do. Would appreciate any help!
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: quick way to fill in corresponding codes in blank cells?

    There is a way without a script.

    Copy the phone numbers to another column
    Remove duplicates (data ribbon)
    Add numbers to column on right
    Use VLOOKUP function to map assignments to original list.

    See the attachment
    Attached Files Attached Files
    Martin

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: quick way to fill in corresponding codes in blank cells?

    Maybe:

    Using a helper sheet in this case Sheet 2 which lists the phone numbers with the correct codes

    Please Login or Register  to view this content.
    Or if you need to filter first to create a helper sheet then maybe:

    Please Login or Register  to view this content.
    Probably better ways.

  4. #4
    Registered User
    Join Date
    05-07-2013
    Location
    Berkeley, CA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: quick way to fill in corresponding codes in blank cells?

    Thanks to both of you! I tried the VLOOKUP and it does work, I haven't yet gotten to trying the helper sheet. Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Fill blank cells with data directly above that blank cell
    By gibson2503 in forum Excel General
    Replies: 3
    Last Post: 06-05-2013, 10:07 AM
  2. How to color-fill blank cells, then once data is entered cell is no-fill
    By hatemail13 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 07:57 PM
  3. Replies: 0
    Last Post: 04-07-2009, 04:42 PM
  4. Fill in the blank cells
    By yuli.tan in forum Excel General
    Replies: 4
    Last Post: 08-16-2007, 01:59 PM
  5. [SOLVED] Fill blank cells
    By jenny in forum Excel General
    Replies: 3
    Last Post: 01-07-2005, 11:06 AM

Tags for this Thread

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