Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Macro help in veryifying data


I have the following macro which looks up for duplicated data in columns
E&F.

Sub MacroForButton()
Dim EndRow As Integer

On Error Resume Next
ActiveWorkbook.Names("MyRange").Delete
EndRow = Range("E65536").End(xlUp).Row
Range("E4:F" & EndRow & "").Name = "MyRange"

'Clear all Conditional Format in E and F
Columns("E:F").FormatConditions.Delete

'Assign Conditional Formatting to Range
Range("E4").Select
Range("MyRange").FormatConditions.Add Type:=xlExpression, Formula1:= _

"=SUMPRODUCT(($E$4:$E$" & EndRow & "=$E4)*($F$4:$F$" & EndRow &
"=$F4))1"
Range("MyRange").FormatConditions(1).Interior.Colo rIndex = 6
End Sub

What I need help on is how can I modify this macro so that it still
looks for duplicated data but in columns D to I and where its looking
for duplication is in sheet 1 and 2 in a workbook. So if any of the
data on sheet 1 is duplicated on sheet 2 it would highlight it. Can
anyone help?

Many Thanks




--
tweacle
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
Macro question Chris Excel Worksheet Functions 12 July 7th 06 01:23 AM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Extract specific data into its own workbook via macro? Adrian B Excel Discussion (Misc queries) 2 February 24th 05 06:09 AM
Daily Macro to Download Data, Order and paste in order Iarla Excel Worksheet Functions 1 November 17th 04 01:59 PM


All times are GMT +1. The time now is 06:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"