+ Reply to Thread
Results 1 to 19 of 19

Searching within table

  1. #1
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Searching within table

    Hi Eveyone,

    I have an interesting problem that I am hoping someone could help me with. I have attached an excel file with the table in question.

    Cells (B2, C2, & D2) are user entered. I would like to be able to take that input and look up the corresponding criteria in table and be able to return the rebate amount.

    Each category and corresponding rebate is seperated/distinguished by either wattage (upper and lower limit), Lumen (upper and lower limit), or nothing. If the user number falls in between the upper/lower limit of the category in question then it should return the rebate amount.

    Ex. user entered
    Category = Low-Bay Luminaires for Commercial and Industrial Buildings
    wattage = 150
    lumen = 2600

    looking in the table, you will find that it is the lumen range that determine the rebate amount. the 2600 falls between 2500 (lower limit) and 4999 (upper limit), so the rebate that is select should be $10. I am looking for a formula that will accomplish this.

    Im not sure if that explains it well.

    I appreciate any help. thank you
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Searching within table

    Is the reason there is no wattage specifications for Low Bay and Wall Wash because no limits exist?
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    yes, that is correct. No limits exist. it can have any wattage.

  4. #4
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Searching within table

    Hi

    Try below array formula in E2.

    =INDEX($G$5:$G$15,MATCH(TRUE,((B2=$B$5:$B$15)*(((C2>=($C$5:$C$15+0.00000001))*(C2<=($D$5:$D$15+0.00000001)))+((D2>=($E$5:$E$15+0.00000001))*(D2<=($F$5:$F$15+0.00000001)))))>0,0))

    .... Confirm with Ctrl+Shift+Enter.

    IGNORE THIS FORMULA.
    Last edited by misrasomendra; 10-22-2014 at 02:41 PM.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Searching within table

    This solution might be what you are looking for:
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    Hi misrasomendra,

    That worked! thank you. There is another small piece maybe you could help me with. If you look at the table you will see occ sensor or ballast and there are no upper or lower limits. As long as you select ballast in the drop down, it should pull the rebate ( there is only one option). How would you incorporate that into your equation?

    Thanks again! Appreciate your help

  7. #7
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    Hi newdoverman,

    That worked as well. Thank you! This table is part of a much larger list. I will test both methods and see which would be easier to maintain in the future.

    Thank again newdoverman. appreciate the help!

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Searching within table

    Seeing that your real data is much larger, perhaps a larger sample would be in order to be sure that you are getting the best solution possible.

    The tables that I supplied you with can and probably should be located on a worksheet that only holds tables.

    This is an example.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    Thank you newdoverman. I am working on finishing up the list in the next day or two and i will post it here. Thanks again

  10. #10
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    Good morning,

    I have attached the complete list. I appreciate any help.

    Thank you
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    Hi newdoverman,

    Ive attached the complete list. Thank you.

  12. #12
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Searching within table

    Hi,

    See the file.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    Thank you very much misrasomendra. That solve it for me. Appreciate all the help!

  14. #14
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Searching within table

    Thanks for the feedback.

    You can mark the thread as SOLVED if your query is solved satisfactory and can give some rep points to those who you think really helped you by clicking the star of add reputation under our comments.

  15. #15
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    Hi Misrasomendra,

    I have added the rep points.

  16. #16
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Searching within table

    Thanks for the rep point.

    Regards,

  17. #17
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    Hi misrasomendra,

    I have attached the final version of that sheet. I transfered the code that you wrote up but for some reason I am not get rebate results populating for any category that either uses the upper/lower wattage limit or the upper/lower lumen limit. It only populates for the general category.

    If you look at column D on the clean sheet tab, you will find the rebates column. the rebates are not populating for anything that require wattage or lumen info. If you could take a quick look that would be awesome. Appreciate your help misrasomendra.

    Thank you
    Attached Files Attached Files

  18. #18
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Searching within table

    I did not understood what you are saying?

    Regards,

  19. #19
    Registered User
    Join Date
    10-22-2014
    Location
    canada
    MS-Off Ver
    2010
    Posts
    11

    Re: Searching within table

    If you look at column D, you will see that the cells have the formula you came up with but some of the cells are blank (eg. D12, D15, D30). there is an error with them. Could you look at the formula and see if you could help me with that? Its the same forumula from the other sheet you uploaded. Let me know if it is still not clear.

    Thanks

+ 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. [Optimize] Better way of searching a table ?
    By dourpil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2014, 03:21 AM
  2. table searching
    By excellentexcel in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-18-2009, 08:37 AM
  3. Searching a table
    By ThanatosPSU in forum Excel General
    Replies: 2
    Last Post: 05-01-2007, 12:55 PM
  4. Table Searching
    By Joe Miller in forum Excel General
    Replies: 12
    Last Post: 08-08-2006, 04:05 PM
  5. searching in more than one table
    By andyell in forum Excel General
    Replies: 3
    Last Post: 07-12-2006, 03:55 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