+ Reply to Thread
Results 1 to 9 of 9

Populate rows in the sheet based on user input in the cell

  1. #1
    Registered User
    Join Date
    10-08-2008
    Location
    India
    Posts
    14

    Populate rows in the sheet based on user input in the cell

    Could you please guide me how to populate the rows in the sheet (Report) from different sheet (Datas) based on the selection made in Report Sheet. For example if you select city 'Pune', the rows related to Pune City in 'Datas' sheet should be populated in Report Sheet below the Selection.

    Could anyone tell me how to do it in excel 2007?


    Regards

    Ahamed
    Attached Files Attached Files
    Last edited by omdkhaleel; 12-04-2010 at 07:12 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Populate rows in the sheet based on user input in the cell

    What version of excel are you using?

    find-data-and-copy-to-new-location

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Populate rows in the sheet based on user input in the cell

    One way:

    In sheet Datas add Filter into the first row and filter out by: city, month or whatever you need.
    You can also filter by few columns.


    Second way:

    Look at the example (with aditional column)
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-08-2008
    Location
    India
    Posts
    14

    Re: Populate rows in the sheet based on user input in the cell

    Quote Originally Posted by davesexcel View Post
    What version of excel are you using?

    find-data-and-copy-to-new-location
    I am using Excel 2007

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Populate rows in the sheet based on user input in the cell

    Quote Originally Posted by omdkhaleel View Post
    I am using Excel 2007
    Please modify your profile to indicate that.

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Populate rows in the sheet based on user input in the cell

    Give this a go,

    Make your selection then run the code, you can assign the code to a button, or you can use the worksheet change event to call the code whenever you change C5

    Please Login or Register  to view this content.
    Last edited by davesexcel; 12-04-2010 at 07:41 AM.

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Populate rows in the sheet based on user input in the cell

    Make the selection from the drop down menu and the information will show up, I un-merged the cell(C5:D5), as merged cells can be a pain.


    Right click the sheet tab and select view code to see the worksheet code

    It is saved as an Excel Macro enabled workbook
    Attached Files Attached Files

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Populate rows in the sheet based on user input in the cell

    Why not use a PivotTable?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Populate rows in the sheet based on user input in the cell

    That was my first answer... To just put Filter there.. And it's best way

+ 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