+ Reply to Thread
Results 1 to 2 of 2

Can you use VLookup with ColorFunction?

Hybrid View

  1. #1
    Registered User
    Join Date
    05-17-2011
    Location
    Portsmouth, N.H.
    MS-Off Ver
    Excel 2003
    Posts
    1

    Can you use VLookup with ColorFunction?

    I'm having trouble with a formula. I have a page called "Vendor Comparison" it lists the plants and provides space to enter the pricing from each vendor. Each vendor has its own individual page formatted for faxing. What I would like is to pick the best price with a color and that price would show up on that vendors page. (Each vendor would have its own color) Is this possible? Thanks
    Attached Images Attached Images

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Can you use VLookup with ColorFunction?

    Try this macro to do the colouring.

    Sub Test()
    For N = 6 To Cells(Rows.Count, 1).End(xlUp).Row
        For M = 5 To Cells(N, Columns.Count).End(xlToLeft).Column
            If Cells(N, M) = WorksheetFunction.Min(Range(Cells(N, 5), Cells(N, Columns.Count).End(xlToLeft))) Then
                Cells(N, M).Interior.ColorIndex = Cells(4, M).Interior.ColorIndex
                Exit For
            End If
        Next M
    Next N
    End Sub
    Martin

+ 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