+ Reply to Thread
Results 1 to 10 of 10

Populating two rows when a specific value is entered into a cell

  1. #1
    Registered User
    Join Date
    11-26-2018
    Location
    London, UK
    MS-Off Ver
    Office 2010
    Posts
    24

    Populating two rows when a specific value is entered into a cell

    Hello,

    I wonder if any can guide me.

    I have a vlookup formulas in sheet 1 which relate to data in sheet 2.
    When a particular code number is typed in a cell in sheet 1 it populates some cells with information from sheet 2 using a vlookup.


    However for some code numbers I need a second row to be added. So I would like when a particular value is typed for a second row to be added (which will contain the same data as the first entry; except for one cell; but don't worry about that for now).


    My question is; does anyone know if what I want is possible ? And if so can anyone offer some advice on how I can complete this.


    Thanks to everyone that considers this post.


    El.

  2. #2
    Valued Forum Contributor than_gold's Avatar
    Join Date
    10-17-2017
    Location
    Coimbatore India
    MS-Off Ver
    Office 365
    Posts
    646

    Re: Populating two rows when a specific value is entered into a cell

    You could try with Index+Match,
    Pls attach the sample excel sheet for assist you in better way.
    Regards,
    Thangavel D

    Appreciate the help? CLICK *

  3. #3
    Registered User
    Join Date
    11-26-2018
    Location
    London, UK
    MS-Off Ver
    Office 2010
    Posts
    24

    Re: Populating two rows when a specific value is entered into a cell

    Thanks for you response, I am not in a position to attached anything at the moment. But I will attached something later this evening. Thank you.

  4. #4
    Registered User
    Join Date
    11-26-2018
    Location
    London, UK
    MS-Off Ver
    Office 2010
    Posts
    24

    Re: Populating two rows when a specific value is entered into a cell

    Hi All,

    Sorry for the delay in providing further information.

    I have attached a simple version of the spreadsheet. Sheet 1 contains vlookups and sheet 2 contains data. So when a number in inputted in column E of sheet 1, some other columns are also populated. But for some code numbers I need two rows to be populated in sheet 1 when the code number is input into column E of sheet 1. See the entries highlighted in orange in sheet 2, I would need both rows to appear in sheet 1, when the code in inputted.

    Sorry; I hope this makes sense to you.

    Does anyone know if what I require is possible ? And if so any ideas on how to action this (either as a formula or in VBA).

    Thanks for considering this post.

    El.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,428

    Re: Populating two rows when a specific value is entered into a cell

    The following works for the file attached to post #4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note that for this to work E3 and E7 would have to be left blank.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    11-26-2018
    Location
    London, UK
    MS-Off Ver
    Office 2010
    Posts
    24

    Re: Populating two rows when a specific value is entered into a cell

    This works. Thanks you so much. I'm sorry to ask another question but can this be done in VBA ( so that the sheet only contains values and not formulas). If you are too busy for this do not worry you have helped me but it would be very useful to me to also know VBA way. Thanks you sir.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,383

    Re: Populating two rows when a specific value is entered into a cell

    I will move the thread to the VBA section, where you should post if you want VBA solutions.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,428

    Re: Populating two rows when a specific value is entered into a cell

    I am VBA illiterate, so I can't help in that regard. I hope that you have a blessed day.

  9. #9
    Registered User
    Join Date
    11-26-2018
    Location
    London, UK
    MS-Off Ver
    Office 2010
    Posts
    24

    Re: Populating two rows when a specific value is entered into a cell

    Thanks you ever so much for your help. Good day to you also.

  10. #10
    Registered User
    Join Date
    11-26-2018
    Location
    London, UK
    MS-Off Ver
    Office 2010
    Posts
    24

    Populating two rows when a specific value is entered into a cell

    Hello Everyone,

    Can someone please help me. A very helpful person has given me an Excel Formula that solves a problem I have (see the posts above for all details but in summary; the code given to me enable a second row to be populated in excel when certain numbers are inputted and when other numbers are inputted only gives data for one row. The formula works very well but I need the spreadsheet to have only values in cells not formula.

    So can anyone tell me how I can use this code in VBA (perhaps with the Evaluate function or something suitable) so I can still have the ability for a second row to be added when certain number inputted but also to only have value. I hope you can all understand what I am explaining. Ask any questions if you need to know more. Above is the code and a sample spreadsheet which uses the code.

    thanks for considering this question.

    El

+ 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. Populating multiple rows when data is added to specific cell
    By llomax83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2017, 01:41 AM
  2. [SOLVED] Populating a Combobox when data is entered into an adjacent cell
    By HELIXMB in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-03-2016, 01:00 PM
  3. Replies: 13
    Last Post: 05-02-2016, 06:03 AM
  4. Populating rows with formulas when new data is entered
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 05-15-2015, 01:35 PM
  5. Auto Populating a cell at a specific time if nothing has been entered in the cell.
    By DomzDolley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2014, 06:22 PM
  6. [SOLVED] running a macro when specific text is entered into a specific cell
    By deek in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-02-2014, 10:05 AM
  7. [SOLVED] how to stop Command button If specific number is entered in a specific cell range
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2013, 05:10 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