Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default Using Range operator (:) In If condition

I have an excel sheet, which provided by client, In that one cell contains
formula as follows:
=IF((P42:Q42)=(P43:Q43),"In Balance","Out of Balance")

As per the above formula, My understanding is, P42 should be equal to P43
and Q42 should be equal to Q43, then I will get "In Balance" as output. When
I tried to changes the values in the cells, it is not giving "Out of Balance"
and always showing "In balance" as output. Could you please suggest me on
this.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Using Range operator (:) In If condition

=IF(AND(P42=P43,Q42=Q43),"In Balance","Out of Balance")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Soundar" wrote in message
...
I have an excel sheet, which provided by client, In that one cell contains
formula as follows:
=IF((P42:Q42)=(P43:Q43),"In Balance","Out of Balance")

As per the above formula, My understanding is, P42 should be equal to P43
and Q42 should be equal to Q43, then I will get "In Balance" as output.
When
I tried to changes the values in the cells, it is not giving "Out of
Balance"
and always showing "In balance" as output. Could you please suggest me on
this.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Using Range operator (:) In If condition

Difficult as you are trying to compare 2 ranges. I would have thought
an array formula exists for this, however arrays are not my specialty.
You colud always just have the following:
Cell P44:
=P42=P43
Cell Q44:
=Q42=P43
Cell R44:
=IF(AND(P44, R44), "In Balance","Out of Balance")

Hope this helps.

Giff

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Using Range operator (:) In If condition

This formula will only compare P42 with P43

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Soundar" wrote in message ...
|I have an excel sheet, which provided by client, In that one cell contains
| formula as follows:
| =IF((P42:Q42)=(P43:Q43),"In Balance","Out of Balance")
|
| As per the above formula, My understanding is, P42 should be equal to P43
| and Q42 should be equal to Q43, then I will get "In Balance" as output. When
| I tried to changes the values in the cells, it is not giving "Out of Balance"
| and always showing "In balance" as output. Could you please suggest me on
| this.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default Using Range operator (:) In If condition

Thanks Niek, It is checking 'P' column only and it is not checking 'Q' column
as you said. When I tried by entering value '10' in A1 and A2 and value '20'
in B1 and B2, and used the same formula as follows

=IF((A1:B1)=(A2:B2),"In Balance","Out of Balance")

It is checking for columns 'B' and it is not checking for column 'A'. Is
there any ides, on what basis the formula is deciding the columns, or the
formula which I am using is wrong.

Thanks in Advance,
Soundar.



"Niek Otten" wrote:

This formula will only compare P42 with P43

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Soundar" wrote in message ...
|I have an excel sheet, which provided by client, In that one cell contains
| formula as follows:
| =IF((P42:Q42)=(P43:Q43),"In Balance","Out of Balance")
|
| As per the above formula, My understanding is, P42 should be equal to P43
| and Q42 should be equal to Q43, then I will get "In Balance" as output. When
| I tried to changes the values in the cells, it is not giving "Out of Balance"
| and always showing "In balance" as output. Could you please suggest me on
| this.



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
sumproduct-condition as a range amh Excel Discussion (Misc queries) 3 July 26th 07 05:36 PM
condition chart color bar range Daniel Charts and Charting in Excel 1 June 13th 07 05:24 PM
display a range of data when triggered by a specific condition colligan25 Excel Worksheet Functions 1 February 25th 06 11:31 PM
Vlookup using a range condition John Excel Worksheet Functions 4 August 26th 05 08:40 PM
Can I sum or average a range with more than 1 condition? BobT Excel Discussion (Misc queries) 4 February 14th 05 07:28 PM


All times are GMT +1. The time now is 02:23 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"