Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Worksheet Comparison

I have a small family business and need to be able to compare cells from
sheet1 to sheet2 via macro. Each worksheet has a different number of rows
and columns. Conditional formatting would be great but not allowed with
multiple sheets. "Range" seems appropriate but I'm not familiar with it. In
short of what I'm trying to accomplish, I need to highlight the cells from
sheet1 that matches the header from sheet2. Multiple results are expected
from each row/column on sheet1. Can you help? I would like all users to be
able to run a macro montly to validate data collected.
Hope you can help me. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Worksheet Comparison

Please supply more specific information on what you want?

Is the header in one row or across many rows.
Does the header need to match the data in the same row?


"LoveSunnyDay" wrote:

I have a small family business and need to be able to compare cells from
sheet1 to sheet2 via macro. Each worksheet has a different number of rows
and columns. Conditional formatting would be great but not allowed with
multiple sheets. "Range" seems appropriate but I'm not familiar with it. In
short of what I'm trying to accomplish, I need to highlight the cells from
sheet1 that matches the header from sheet2. Multiple results are expected
from each row/column on sheet1. Can you help? I would like all users to be
able to run a macro montly to validate data collected.
Hope you can help me. Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Worksheet Comparison

Sorry about that.

The header is in one row.

The header from sheet1 will never be a header in sheet2 and vise versa.

Sheet1 header may be in multiple cells in different rows and/or columns on
sheet2.

I hope this is clearer. Working this through has been a challenge today.
Thanks again.


"Barb Reinhardt" wrote:

Please supply more specific information on what you want?

Is the header in one row or across many rows.
Does the header need to match the data in the same row?


"LoveSunnyDay" wrote:

I have a small family business and need to be able to compare cells from
sheet1 to sheet2 via macro. Each worksheet has a different number of rows
and columns. Conditional formatting would be great but not allowed with
multiple sheets. "Range" seems appropriate but I'm not familiar with it. In
short of what I'm trying to accomplish, I need to highlight the cells from
sheet1 that matches the header from sheet2. Multiple results are expected
from each row/column on sheet1. Can you help? I would like all users to be
able to run a macro montly to validate data collected.
Hope you can help me. Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Worksheet Comparison

I found assistance from one of the discussions but I'm still at a lost on how
I can use another worksheet (from the same workbook) as the source for
"MySearch" below.
Sheet2 ("WORK") ROW1 contain all the information I need in my array
"MySearch".

Private Sub CompSource_Click()
Dim FirstAddress As String
Dim MySearch As Variant
Dim myColor As String
Dim rng As Range
Dim I As Long
Dim ProData As Integer

MySearch = Array("07JA07", "JNE07", ...) *** this is only part of the data
that "HOME" Row 1 has. It has the potential to grow to 100 rows. Once it
reaches "" end search ***
myColor = "6"
With Sheets("HOME").Cells 'SHEET1

..Interior.ColorIndex = xlColorIndexNone

For I = LBound(MySearch) To UBound(MySearch)
Set rng = .Find(What:=MySearch(I), _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
FirstAddress = rng.Address
Do
rng.Interior.ColorIndex = myColor
Set rng = .FindNext(rng)
Loop While Not rng Is Nothing And rng.Address < FirstAddress
End If
Next I
End With
End Sub

Hopefully this gives you an idea of what I'm working on.

"LoveSunnyDay" wrote:

Sorry about that.

The header is in one row.

The header from sheet1 will never be a header in sheet2 and vise versa.

Sheet1 header may be in multiple cells in different rows and/or columns on
sheet2.

I hope this is clearer. Working this through has been a challenge today.
Thanks again.


"Barb Reinhardt" wrote:

Please supply more specific information on what you want?

Is the header in one row or across many rows.
Does the header need to match the data in the same row?


"LoveSunnyDay" wrote:

I have a small family business and need to be able to compare cells from
sheet1 to sheet2 via macro. Each worksheet has a different number of rows
and columns. Conditional formatting would be great but not allowed with
multiple sheets. "Range" seems appropriate but I'm not familiar with it. In
short of what I'm trying to accomplish, I need to highlight the cells from
sheet1 that matches the header from sheet2. Multiple results are expected
from each row/column on sheet1. Can you help? I would like all users to be
able to run a macro montly to validate data collected.
Hope you can help me. Thanks!

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
Lookup or worksheet comparison ComicFly Excel Worksheet Functions 0 February 6th 08 02:23 PM
bringing data together from two worksheet for comparison jb Excel Worksheet Functions 1 September 21st 07 02:28 PM
Complex comparison of Columns of Data: Extracting unique records after comparison on 4 levels ap Excel Programming 2 January 23rd 07 10:12 AM
Excel worksheet comparison software Colin Hayes Excel Worksheet Functions 3 November 29th 06 02:58 AM
2 Worksheet Comparison Across 2 Workbooks [email protected] Excel Programming 3 March 23rd 05 09:07 PM


All times are GMT +1. The time now is 10:49 AM.

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

About Us

"It's about Microsoft Excel"