+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Conditional Formatting / Lookup

Hybrid View

  1. #1
    Registered User
    Join Date
    11-06-2009
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Conditional Formatting / Lookup

    Ill try to give as much detail as possible. This forum has been very helpful to me in the past and I thank anyone for trying to help.

    Our company has multiple billing rates for different types of service we provide. I am putting a spreadsheet for each office to fill out where they select in column A the type of service/hours worked (hourly, daily, weekly). I have formatted column A to have a pull down list of our service types (hourly, daily, weekly) and want column B to automatically select the rate for each and enter it into the cell. I have the associated rates entered into the same tab ($2.00, $3.00, $4.00 respectively).

    Question is, how can I get column B to automatically lookup the rates and enter into the spreadsheet?

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

    Re: Conditional Formatting / Lookup

    Hi,

    you can use VLookup for that

    =VLOOKUP(A1,$M$1:$N$10,2,False)

    Where

    A1 is the value you have entered and want to find the rate for.
    M1:N10 is a two column range with the service types listed in column M and the rates in column N
    2 means to return the value from the second column of the lookup table in the row where the value was found
    FALSE means that only exact matches are returned.

    Adjust the cell references to your spreadsheet layout.

    hth

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,960

    Re: Conditional Formatting / Lookup

    Look here:
    Attached Files Attached Files
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    11-06-2009
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Conditional Formatting / Lookup

    Okay - both posts helped (repped both). I used VLookup because I already had a table created that way for the rates.

    Last question, I want all the other cells in the column to do the lookup the same way but when I auto fill the formula down the LOOKUP changes where it is looking for cells I do not want it to and spits back #N/A.

    I have attached the file for you to see what I mean.
    Attached Files Attached Files
    Last edited by rampage007; 12-06-2009 at 05:42 PM. Reason: repped

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

    Re: Conditional Formatting / Lookup

    Hi,

    before you copy your formula down you'll have to apply absolute references, otherwise they'll be adjusted as the formula is copied down the rows.

    =HLOOKUP(A1,$K$1:$M$2,2,0)

    will not change the K1:M2 reference.

    hth

  6. #6
    Registered User
    Join Date
    11-06-2009
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Conditional Formatting / Lookup

    Did that and worked perfectly.

    When I copy down I still get #N/A for cells that have not yet been picked by the pull down. Possible to enter a phrases like "Not Used" or just have it default as a value of zero if the pull down is not used?

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

    Re: Conditional Formatting / Lookup

    try

    =if(isblank(A1),"",HLOOKUP(A1,$K$1:$M$2,2,0))

  8. #8
    Registered User
    Join Date
    11-06-2009
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Conditional Formatting / Lookup

    That solves it. Thanks

+ 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