A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using IF to compare ranges



 
 
Thread Tools Display Modes
  #1  
Old April 8th, 2009, 05:32 PM posted to microsoft.public.excel.worksheet.functions
[email protected]
external usenet poster
 
Posts: 27
Default Using IF to compare ranges

This seems like it should be a simple task, however, I have entered the
following formula:
=IF(A4:I4=K4:S4," ","CHECK")
to compare a range of cells to another range (current data vs draft changed
data). If there's a difference, I want the word "CHECK" to appear in this
cell. In the formula dialog box, the formula result is right, exactly what I
want. But when I click OK to apply this formula, the cell in which the
formula rests contains the dreaded "#VALUE!" message.

Advice??

Thanks,
rhodesmk

  #2  
Old April 8th, 2009, 05:36 PM posted to microsoft.public.excel.worksheet.functions
[email protected]
external usenet poster
 
Posts: 27
Default Using IF to compare ranges

Sorry, I meant to also state that some cells contain numbers, but others
contain text, if that makes a difference.

" wrote:

This seems like it should be a simple task, however, I have entered the
following formula:
=IF(A4:I4=K4:S4," ","CHECK")
to compare a range of cells to another range (current data vs draft changed
data). If there's a difference, I want the word "CHECK" to appear in this
cell. In the formula dialog box, the formula result is right, exactly what I
want. But when I click OK to apply this formula, the cell in which the
formula rests contains the dreaded "#VALUE!" message.

Advice??

Thanks,
rhodesmk

  #3  
Old April 8th, 2009, 05:46 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default Using IF to compare ranges

Try,

=IF(SUMPRODUCT(--(A4:I4=K4:S4))=9,"Check","")

Mike

" wrote:

Sorry, I meant to also state that some cells contain numbers, but others
contain text, if that makes a difference.

" wrote:

This seems like it should be a simple task, however, I have entered the
following formula:
=IF(A4:I4=K4:S4," ","CHECK")
to compare a range of cells to another range (current data vs draft changed
data). If there's a difference, I want the word "CHECK" to appear in this
cell. In the formula dialog box, the formula result is right, exactly what I
want. But when I click OK to apply this formula, the cell in which the
formula rests contains the dreaded "#VALUE!" message.

Advice??

Thanks,
rhodesmk

  #4  
Old April 8th, 2009, 05:50 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Using IF to compare ranges

Try this array formula** :

=IF(AND(A4:I4=K4:S4),"","Check")

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

This does a cell-to-cell comparison.

A4=K4
B4=L4
C4=M4
etc
etc
I4=S4

--
Biff
Microsoft Excel MVP


" wrote in
message ...
This seems like it should be a simple task, however, I have entered the
following formula:
=IF(A4:I4=K4:S4," ","CHECK")
to compare a range of cells to another range (current data vs draft
changed
data). If there's a difference, I want the word "CHECK" to appear in this
cell. In the formula dialog box, the formula result is right, exactly
what I
want. But when I click OK to apply this formula, the cell in which the
formula rests contains the dreaded "#VALUE!" message.

Advice??

Thanks,
rhodesmk



  #5  
Old April 8th, 2009, 06:04 PM posted to microsoft.public.excel.worksheet.functions
[email protected]
external usenet poster
 
Posts: 27
Default Using IF to compare ranges

Thank you, thank you!

That worked perfectly.



"T. Valko" wrote:

Try this array formula** :

=IF(AND(A4:I4=K4:S4),"","Check")

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

This does a cell-to-cell comparison.

A4=K4
B4=L4
C4=M4
etc
etc
I4=S4

--
Biff
Microsoft Excel MVP


" wrote in
message ...
This seems like it should be a simple task, however, I have entered the
following formula:
=IF(A4:I4=K4:S4," ","CHECK")
to compare a range of cells to another range (current data vs draft
changed
data). If there's a difference, I want the word "CHECK" to appear in this
cell. In the formula dialog box, the formula result is right, exactly
what I
want. But when I click OK to apply this formula, the cell in which the
formula rests contains the dreaded "#VALUE!" message.

Advice??

Thanks,
rhodesmk




  #6  
Old April 8th, 2009, 06:47 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Using IF to compare ranges

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


" wrote in
message ...
Thank you, thank you!

That worked perfectly.



"T. Valko" wrote:

Try this array formula** :

=IF(AND(A4:I4=K4:S4),"","Check")

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

This does a cell-to-cell comparison.

A4=K4
B4=L4
C4=M4
etc
etc
I4=S4

--
Biff
Microsoft Excel MVP


" wrote
in
message ...
This seems like it should be a simple task, however, I have entered the
following formula:
=IF(A4:I4=K4:S4," ","CHECK")
to compare a range of cells to another range (current data vs draft
changed
data). If there's a difference, I want the word "CHECK" to appear in
this
cell. In the formula dialog box, the formula result is right, exactly
what I
want. But when I click OK to apply this formula, the cell in which the
formula rests contains the dreaded "#VALUE!" message.

Advice??

Thanks,
rhodesmk






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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