How would i get something like the following code to work? Right now it returns true no matter what, when this should always be false.
Please Login or Register to view this content.
How would i get something like the following code to work? Right now it returns true no matter what, when this should always be false.
Please Login or Register to view this content.
Last edited by GaidenFocus; 07-12-2012 at 03:06 PM.
GaidenFocus,
Right now that code is checking the values against each other. If both A2 and A3 are blank, it will return True. To see if a cell is part of another range, you'll need to use the Intersect method.
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
orPlease Login or Register to view this content.
since both are single cellsPlease Login or Register to view this content.
Remember what the dormouse said
Feed your head
It works perfect for me.
You are here asking if the value in A2 = the value in A3.Please Login or Register to view this content.
When I ran the code, if A2 = A3 then the msgbox gave "True" else "False"!
Thanks romper and tiger the intersect method worked just like i needed it to. Steve, i was not trying to compare the values in the cells, i was trying to compare the range stored in the variable.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks