View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default lookup value and change background colour

=Offset(Product!$A$7,Match(B18,Categories,0),Match (C18,Months,0))

Dim res as Variant, res1 as Variant
res = Application.Match(Range("B18"),Range("Categories") ,0)
res1 = Application.Match(Range("C18"),Range("Months"),0)
if not iserror(res) and not iserror(res1) then
Range("Product!A7").offset(res,res1).Interior.Colo rIndex = 6
End if

--
Regards,
Tom Ogilvy


"JulieD" wrote in message
...
Hi All

How do i (with code), lookup a cell - using the offset & match function -
and set the background colour to yellow..

the function i'm wanting to use is
=Offset(Product!$A$7,Match(B18,Categories,0),Match (C18,Months,0))

thanks
JulieD