+ Reply to Thread
Results 1 to 8 of 8

Fill Column based on Data in Column A

  1. #1
    Registered User
    Join Date
    12-10-2011
    Location
    Washington, DC
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    15

    Fill Column based on Data in Column A

    Dear all,

    My problem is as follows:

    - I have multiple sheets in my workbook;
    - The number of rows in each sheet differ;
    - Column A has serial numbers;
    - Cell B6 has Text;
    - I would like to copy the text in B6 to all cells in B column as long as there is any data in corresponding cell in Column A.
    - I put together the below code from two three other suggestions on forums;
    - For some reasons, this only works on the active sheet and not on all sheets.

    Please help.

    Thank you



    Please Login or Register  to view this content.
    Last edited by sm789; 03-28-2016 at 09:42 AM.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Fill Column based on Data in Column A

    Hi there,

    I have to go out now, so here's an untested knee-jerk response, but it might help - try using:

    Please Login or Register  to view this content.

    Please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    12-10-2011
    Location
    Washington, DC
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    15

    Re: Fill Column based on Data in Column A

    Thank you Greg.

    Same outcome. It just does it on the active sheet.

    Regards,
    Sam

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Fill Column based on Data in Column A

    Hi again,

    Many thanks for your prompt feedback.

    Sorry - posting without testing is never a good idea

    The dreaded "non fully qualified references" strike again!!!

    Try:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  5. #5
    Registered User
    Join Date
    12-10-2011
    Location
    Washington, DC
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    15

    Re: Fill Column based on Data in Column A

    Hi Greg!

    Thank you very much! It works beautifully.

    Can I ask a follow up question - is there a way to make selection of B6 and column B dynamic? I would like the macro to come up with a msg box asking me which column to populate and the first cell in that column with text.

    Best regards,
    Sudhir

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Fill Column based on Data in Column A

    Hi again,

    Many thanks for your feedback.

    The following code should do what you need - it contains ErrorHandling and data validation checks that weren't included in the previous version:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  7. #7
    Registered User
    Join Date
    12-10-2011
    Location
    Washington, DC
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    15

    Re: Fill Column based on Data in Column A

    Thank you Greg! You are awesome!

  8. #8
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Fill Column based on Data in Column A

    Hi again,

    Stop - you're making me blush!

    Many thanks for your feedback - glad I was able to help.

    Best regards,

    Greg M

+ 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. [SOLVED] How to fill an array with values in column C based on Column D date value of Today
    By jrtraylor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-10-2016, 07:44 PM
  2. Fill Down Data Based on Contents of Another Column
    By excel6000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-17-2014, 02:50 PM
  3. [SOLVED] Fill a cell in Column B based on the text in Column A using a table on sheet 2
    By lbrasfie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-25-2013, 01:56 PM
  4. Fill cells in one column based on specific words or letter from another column
    By dokkadokka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2013, 07:04 AM
  5. Insert column and fill column upto where data is in previous column
    By aka189 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-24-2012, 06:07 AM
  6. Replies: 0
    Last Post: 08-10-2012, 12:55 PM
  7. Fill down formula based on another column data
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2012, 10:41 AM

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