Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Is there a way to compare all columns in a Row and flag difference

I would like to compare that the values for each column of two different rows
are identical. If there are differences on the second row flag them somehow.

Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Is there a way to compare all columns in a Row and flag difference

To compare the value in cells in rows 2 and 5

Dim rng as Range, cell as Range
Range("2:2,5:5").Interior.ColorIndex = xlNone
set rng = Range(Cells(2,1),Cells(2,columns.Count).End(xltoLe ft))
for each cell in rng
if cell < cell.offset(3,0) then
cell.Interior.ColorIndex = 3
cell.offset(3,0).Interior.Colorindex = 3
end if
Next

Assumes column 2 has values farthest to the right or they are equal.

--
Regards,
Tom Ogilvy

"Neil" wrote:

I would like to compare that the values for each column of two different rows
are identical. If there are differences on the second row flag them somehow.

Is this possible?

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
Compare two columns and find the difference between the two column kpk Excel Discussion (Misc queries) 2 April 3rd 23 01:30 PM
I want to compare totals and flag those less than or more than Moz Excel Discussion (Misc queries) 1 March 26th 10 04:41 PM
compare for high with two or more cells and then flag. Mario Excel Discussion (Misc queries) 1 November 20th 09 02:01 PM
How do I compare the difference in two spreadsheets? Daysi Excel Worksheet Functions 1 November 22nd 05 06:00 PM
charting a difference of 2 columns' w/o adding a difference column Wab Charts and Charting in Excel 4 July 27th 05 02:37 AM


All times are GMT +1. The time now is 05:54 AM.

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"