+ 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
    641

    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 2010/2019
    Posts
    6,206

    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
    Ipswich, England
    MS-Off Ver
    Excel 2016 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    23,113

    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!

    STOP PRESS: Forum Rules Updated September 2018! Please read them here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2010/2019
    Posts
    6,206

    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)

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