Wrox Programmer Forums
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 10th, 2009, 10:46 AM
Authorized User
Join Date: Feb 2009
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default Conditional Formating

Dear friends

May I ask your help again as wane a code likes Vb or Macros if it can match the value Form active Sheets1 Range “L3 to L300” to work Sheets2 the Range from “B3 to B100” if the value can matched than Sheet1 the targets Row from A to L highlighted yellow,

Does it able to work ?
Old March 12th, 2009, 04:19 AM
Friend of Wrox
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts

You can try something similar :

Sub Check_S1_In_S2()
Dim oWS1 As Worksheet
Dim oWS2 As Worksheet
Set oWS1 = Sheets(1)
Set oWS2 = Sheets(2)
Dim oCEll
Dim oRng As Range
For Each oCEll In oWS1.Range("L3:L100")
    If Len(oCEll.Value) <> 0 Then
        Set oRng = oWS2.Range("B3:B100").Cells.Find(what:=oCEll.Value, lookat:=xlWhole, LookIn:=xlValues)
        If Not oRng Is Nothing Then
                oWS1.Range(Cells(oCEll.Row, 1), Cells(oCEll.Row, 12)).Interior.ColorIndex = 36
        End If
    End If
Next oCEll
End Sub
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips &amp; Tricks (http://www.vbadud.blogspot.com)
Old March 12th, 2009, 09:28 PM
Authorized User
Join Date: Feb 2009
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts

your help I highly appreciat

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drill down formating FAP BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 May 22nd, 2006 11:00 AM
Number formating kondapally Crystal Reports 1 January 3rd, 2005 11:07 AM
HTML formating gmoney060 Classic ASP Basics 6 August 15th, 2004 08:28 PM
DataGridTextBoxColumn Formating melvik C# 1 June 1st, 2004 03:28 PM
formating numbers renee_santoscoi Visual C++ 0 December 8th, 2003 06:00 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.