+ Reply to Thread
Results 1 to 11 of 11

Insert column and then populate date when matching

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    99

    Insert column and then populate date when matching

    Hi All,

    I have two sheet available in below path
    Master.xls='C:\temp'
    Company_list=''C:\child'

    I want to insert one column name as"Sector" and then populate company name when the User_fullname (col U) is matching with Name column from another sheet "Company_list".
    Once it is over, the master sheet will be automatically saved and then all sheet will be closed.

    Could you please help me.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Insert column and then populate date when matching

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Insert column and then populate date when matching

    Thank yoiu Jindon for your great help.

    Master workbook sheet name is always changing. is it possible to change the macro by mentioning "sheet1" in stead of "Data".
    I tried but I am getting run time error 9.

    With Sheets("sheet1").Cells(1).CurrentRegion

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Insert column and then populate date when matching

    error 9 means sheet1 is not correct.
    It might have extra space(s).

    How about
    Please Login or Register  to view this content.
    ?

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Insert column and then populate date when matching

    Do you mean the first sheet in workbook? Try...

    With Sheets(1).Cells(1).CurrentRegion
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  6. #6
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Insert column and then populate date when matching

    Thank you once again. Its working fine. Thank you kev for help

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Insert column and then populate date when matching

    You are welcome and thanks for the rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  8. #8
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Insert column and then populate date when matching

    Thank You Jindon for your guidance.

    When I run the macro, it is working fine. whenever there is no matching in the data, it displays values as zero.
    As the column is text field, is it possible to display blank in stead of zero for mismatch user name

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Insert column and then populate date when matching

    ?
    If the cell format is General as your sample workbook, it should be no value when no match.
    I can not replicate your problem.

    Do you want to upload that workbook?

  10. #10
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Insert column and then populate date when matching

    I use the below approach for removing zero through recording of macro
    Please Login or Register  to view this content.
    Its working.
    Last edited by abraham30; 05-28-2017 at 11:38 AM. Reason: Updated as per rule

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Insert column and then populate date when matching

    You need to edit your last post and wrap the code with the code tags.
    [noparse][code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]

    It is a strict forum rule.

    BTW
    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]
    should be
    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]

+ 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. Replies: 3
    Last Post: 10-04-2016, 08:19 AM
  2. Replies: 1
    Last Post: 09-09-2015, 10:36 AM
  3. Replies: 5
    Last Post: 09-09-2015, 09:49 AM
  4. [SOLVED] populate column data based on matching from other sheet
    By sarat47.dash in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2015, 10:36 AM
  5. [SOLVED] date and time needs to be auto populate when i insert data in another column.
    By Giri.hb in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-29-2014, 09:46 AM
  6. [SOLVED] VBA to Populate Sheets by Matching column headers
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 56
    Last Post: 11-06-2013, 08:41 AM
  7. [SOLVED] Help with using VBA to populate columns matching date with a count/sum
    By compto in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-14-2012, 09:24 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