#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mtpsuresh
 
Posts: n/a
Default Compare cells


Hi,

Can anyone help me out pls.

I am trying to compare two values

if application.worksheetfunction.sum(Range("A1:A2") <Range("A3").value
then
msgbox "NotEqual"
end if

For Eg:
A1= 676821.92
A2=40936.43
A3=717758.35
it says it is not equal. But if i add VBA.VAL on both side of the
expressions, it doesnt display any message. I really dont get this.


--
mtpsuresh
------------------------------------------------------------------------
mtpsuresh's Profile: http://www.excelforum.com/member.php...o&userid=31817
View this thread: http://www.excelforum.com/showthread...hreadid=515439

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR
 
Posts: n/a
Default Compare cells

Sub equal()
If Range("a1").Value + Range("a2").Value < Range("A3").Value Then
MsgBox "Not Equal"
Else
MsgBox "Equal"
End If
End Sub


Vaya con Dios,
Chuck, CABGx3

"mtpsuresh" wrote:


Hi,

Can anyone help me out pls.

I am trying to compare two values

if application.worksheetfunction.sum(Range("A1:A2") <Range("A3").value
then
msgbox "NotEqual"
end if

For Eg:
A1= 676821.92
A2=40936.43
A3=717758.35
it says it is not equal. But if i add VBA.VAL on both side of the
expressions, it doesnt display any message. I really dont get this.


--
mtpsuresh
------------------------------------------------------------------------
mtpsuresh's Profile: http://www.excelforum.com/member.php...o&userid=31817
View this thread: http://www.excelforum.com/showthread...hreadid=515439


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mtpsuresh
 
Posts: n/a
Default Compare cells


Thanks Vaya con Dios.

But still it thows the same message. But if i add trim() on both sides
it doesnt display the message.

Thanks for your response.


--
mtpsuresh
------------------------------------------------------------------------
mtpsuresh's Profile: http://www.excelforum.com/member.php...o&userid=31817
View this thread: http://www.excelforum.com/showthread...hreadid=515439

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
How do I compare the entry in one cell against all other cells Micki Excel Discussion (Misc queries) 1 February 10th 06 02:46 AM
how do i protect cells in a shared worksheet Debi Excel Discussion (Misc queries) 3 September 30th 05 11:15 PM
Compare data - one cell to multiple cells srs710 Excel Discussion (Misc queries) 1 July 20th 05 11:43 AM
How do you compare text in cells Sam Excel Worksheet Functions 1 February 18th 05 05:16 PM
copy group of cells to another group of cells using "IF" in third Chuckak Excel Worksheet Functions 2 November 10th 04 06:04 PM


All times are GMT +1. The time now is 12:45 PM.

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"