+ Reply to Thread
Results 1 to 7 of 7

Show a cell range on selecting a cell value

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    48

    Question Show a cell range on selecting a cell value

    In excel is it possible to show a range of cells on selecting a value in a specific cell.
    For Example - I want to create a database for different Hotel tariff. Once I select a Cell value from its drop down list (B2 = "Suite"), the corresponding cells (E2,F2,G2) will show the different rates of Suite at one go

    E2 will show Suite double rate (say $500)
    F2 will show Suite Single rate (say $450)
    G2 will show Suite Extra Person rate (say $50)

    Attached sheet (Sheet1 with data, Sheet 2 with Output)

    Thank you for your help
    Attached Files Attached Files
    Last edited by pal_slg; 09-29-2011 at 12:04 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Show a cell range on selecting a cell value

    Hello,

    you can do this with a lookup formula, for example Vlookup

    =VLOOKUP($B2,Sheet1!$A$8:$D$10,COLUMN(B1),FALSE)

    copy across.

    But you would have to change the formula for the next row of calculations to refer to the table with the other hotels.

    If you lay out your data slightly differently, then you can use just one formula copied across AND down.

    Please Login or Register  to view this content.
    See attached
    Attached Files Attached Files

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Show a cell range on selecting a cell value

    Try this

    Re-arrange Sheet1 as shown in this workbook.
    Make named list "Hotel_Name" dynamic.
    i.e.
    Refers To:=
    Please Login or Register  to view this content.
    Then in Sheet2 E2
    Please Login or Register  to view this content.
    Drag Across to Column G, then Down as required.

    Hope this helps
    Attached Files Attached Files
    Last edited by Marcol; 09-29-2011 at 04:55 AM. Reason: Attached workbook
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Show a cell range on selecting a cell value

    Marcol, did you mean to attach a file? Or which is "this workbook" you are referring to?

    Offset and Indirect are volatile and should be used very sparingly.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Show a cell range on selecting a cell value

    Could have sworn I attached the workbook, corrected now ... thanks.

    I agree about the volatility issue, but in this case I can't see this being a problem. Unless of course the OP has to lookup hundreds of tarrifs at a time.

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Show a cell range on selecting a cell value

    You'll never know how big a file will end up, so even if the data sample is small, the file may be massive in real life.

    Marcol, the suggested data layout is not very efficient. Imagine hundreds of hotels.

  7. #7
    Registered User
    Join Date
    09-19-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    48

    Re: Show a cell range on selecting a cell value

    Marcol and Teylyn

    Thank you both for helping. I was having a hard time about how to fix this. This solved my problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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