Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
TUNGANA KURMA RAJU
 
Posts: n/a
Default compare a value in two w/books

Looking for a simple code for:
If this worksheet $b$2 value=other w/book sheet1 $h$2 value
then msg"value exists" and exit sub() ,if not do something else.(both
w/books are in same folder)
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default compare a value in two w/books

If Activesheet.Range("B2").Value =
Workbooks("other.xls").Worksheets("Sheet1").Range( "H2") Then
Msgbox "Value exists"
End if

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"TUNGANA KURMA RAJU" wrote in
message ...
Looking for a simple code for:
If this worksheet $b$2 value=other w/book sheet1 $h$2 value
then msg"value exists" and exit sub() ,if not do something else.(both
w/books are in same folder)



  #3   Report Post  
Posted to microsoft.public.excel.misc
TUNGANA KURMA RAJU
 
Posts: n/a
Default compare a value in two w/books

Thanks ,but it is not working,compile error:expected expression error is
coming.What to do ?

"Bob Phillips" wrote:

If Activesheet.Range("B2").Value =
Workbooks("other.xls").Worksheets("Sheet1").Range( "H2") Then
Msgbox "Value exists"
End if

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"TUNGANA KURMA RAJU" wrote in
message ...
Looking for a simple code for:
If this worksheet $b$2 value=other w/book sheet1 $h$2 value
then msg"value exists" and exit sub() ,if not do something else.(both
w/books are in same folder)




  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default compare a value in two w/books

Probably just NG wrap-around

If ActiveSheet.Range("B2").Value = _
Workbooks("other.xls").Worksheets("Sheet1").Range( "H2") Then
MsgBox "Value exists"
End If


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"TUNGANA KURMA RAJU" wrote in
message ...
Thanks ,but it is not working,compile error:expected expression error is
coming.What to do ?

"Bob Phillips" wrote:

If Activesheet.Range("B2").Value =
Workbooks("other.xls").Worksheets("Sheet1").Range( "H2") Then
Msgbox "Value exists"
End if

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"TUNGANA KURMA RAJU" wrote

in
message ...
Looking for a simple code for:
If this worksheet $b$2 value=other w/book sheet1 $h$2 value
then msg"value exists" and exit sub() ,if not do something else.(both
w/books are in same folder)






  #5   Report Post  
Posted to microsoft.public.excel.misc
TUNGANA KURMA RAJU
 
Posts: n/a
Default compare a value in two w/books

Same error coming !

"Bob Phillips" wrote:

Probably just NG wrap-around

If ActiveSheet.Range("B2").Value = _
Workbooks("other.xls").Worksheets("Sheet1").Range( "H2") Then
MsgBox "Value exists"
End If


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"TUNGANA KURMA RAJU" wrote in
message ...
Thanks ,but it is not working,compile error:expected expression error is
coming.What to do ?

"Bob Phillips" wrote:

If Activesheet.Range("B2").Value =
Workbooks("other.xls").Worksheets("Sheet1").Range( "H2") Then
Msgbox "Value exists"
End if

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"TUNGANA KURMA RAJU" wrote

in
message ...
Looking for a simple code for:
If this worksheet $b$2 value=other w/book sheet1 $h$2 value
then msg"value exists" and exit sub() ,if not do something else.(both
w/books are in same folder)






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 cells from reference cells Mike K Excel Worksheet Functions 2 November 26th 05 02:07 PM
How can I compare Excel files AUSSIE GRAHAM Excel Discussion (Misc queries) 1 July 6th 05 06:14 AM
How can I compare the contents of two Excel files? Igor Green Excel Discussion (Misc queries) 0 May 4th 05 12:58 PM
Compare two spreadsheets to find differences. Toby Excel Discussion (Misc queries) 1 March 29th 05 01:19 AM
Is there a way to compare 2 spreadsheets with Excel? Dave Peterson Excel Discussion (Misc queries) 3 March 29th 05 12:36 AM


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