# excel formula to detect difference in range values from another sheet

#### RAYLWARD102

##### Well-known Member
let's say you have 2 sheets with identical data
Was thinking of a way, for tracking changes made in sheet.
Was thinking column z on source sheet could contain a formula that states something like =if(PreservedSheet!A1:V1 <> SourceSheet!A1:V1, "1","")
Any ideas how to make that formula work; I'm stumped

#### Rick Rothstein

##### MrExcel MVP
let's say you have 2 sheets with identical data
Was thinking of a way, for tracking changes made in sheet.
Was thinking column z on source sheet could contain a formula that states something like =if(PreservedSheet!A1:V1 <> SourceSheet!A1:V1, "1","")
Any ideas how to make that formula work; I'm stumped
What do you mean by "work"... assuming more than one cell in the whatever sheet "sheet" is supposed to refer to, what kind of output are you looking for?

#### RAYLWARD102

##### Well-known Member
What do you mean by "work"... assuming more than one cell in the whatever sheet "sheet" is supposed to refer to, what kind of output are you looking for?
'Work' as in what syntax should I use to make the formula 'work' correctly.
I wanted to fill down this formula, for every row in an excel sheet, that detects a difference in corresponding row, in another sheet (same workbook)

So if sheet1!rangeA1:T1 is different from sheet2!rangeA1:T1 then sheet2!z1 = 1 else sheet2!z1 = ""

Last edited:

#### Rick Rothstein

##### MrExcel MVP
'Work' as in what syntax should I use to make the formula 'work' correctly.
I wanted to fill down this formula, for every row in an excel sheet, that detects a difference in corresponding row, in another sheet (same workbook)

So if sheet1!rangeA1:T1 is different from sheet2!rangeA1:T1 then sheet2!z1 = 1 else sheet2!z1 = ""
In that case, your original formula minus the ranges is what you want. Put this in the first cell and copy it down to the last cell (the addresses will adjust automatically)...

=if(PreservedSheet!A1 <> SourceSheet!A1, "1","")

Last edited: