Hello everyone
I have strange issue with two zeros ..
They are the same format (Text format) and they are the same length and they have the same result out of using Code function
But when comparing the two zeros I got FALSE
Can you have a look please at the attachment?
Two zeros are not equal
-
- PlatinumLounger
- Posts: 4931
- Joined: 31 Aug 2016, 09:02
Two zeros are not equal
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78626
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Two zeros are not equal
If you set the Number Format of the cells to General, and also set the Horizontal Alignment to General, you'll see that B1 becomes right-aligned, indicating that it is a number, and B2 becomes left-aligned, indicating that is a text value.
Correspondingly, TypeName(Range("B1").Value) returns Double, while TypeName(Range("B2").Value) returns String.
That is why Excel does not consider the cells to be equal.
Correspondingly, TypeName(Range("B1").Value) returns Double, while TypeName(Range("B2").Value) returns String.
That is why Excel does not consider the cells to be equal.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4931
- Joined: 31 Aug 2016, 09:02
Re: Two zeros are not equal
Thanks a lot Mr. Hans for this perfect explanation ..
-
- BronzeLounger
- Posts: 1499
- Joined: 28 Feb 2015, 13:11
- Location: Hof, Bayern, Germany
Re: Two zeros are not equal
In my Excel, if I select cell B2 and hover with the mouse near the left of it, I see something to click on
Somefink To Click On.JPG : https://imgur.com/pHB1YB6" onclick="window.open(this.href);return false;
Then if I click on it, it tells me stuff
ClickOnIt.JPG : https://imgur.com/vghHKn1" onclick="window.open(this.href);return false;
It also gives me options. For example I can choose to change it to a number:
Change to value.JPG : https://imgur.com/b0sebkX" onclick="window.open(this.href);return false;
If I do that on your sample, then it changes to True ( In German Wahr )
Its True now.JPG : https://imgur.com/um1Qi09" onclick="window.open(this.href);return false;
Alan
_.___________________________________________________-
Edit 30th December
Somefink To Click On.JPG : https://imgur.com/pHB1YB6" onclick="window.open(this.href);return false;
Then if I click on it, it tells me stuff
ClickOnIt.JPG : https://imgur.com/vghHKn1" onclick="window.open(this.href);return false;
It also gives me options. For example I can choose to change it to a number:
Change to value.JPG : https://imgur.com/b0sebkX" onclick="window.open(this.href);return false;
If I do that on your sample, then it changes to True ( In German Wahr )
Its True now.JPG : https://imgur.com/um1Qi09" onclick="window.open(this.href);return false;
Alan
_.___________________________________________________-
Edit 30th December
You do not have the required permissions to view the files attached to this post.
Last edited by Doc.AElstein on 30 Dec 2018, 13:38, edited 1 time in total.
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also
You can find me at DocAElstein also
-
- PlatinumLounger
- Posts: 4931
- Joined: 31 Aug 2016, 09:02
Re: Two zeros are not equal
Thanks a lot
Can you post the images directly to the post to be more readable?
Can you post the images directly to the post to be more readable?
-
- BronzeLounger
- Posts: 1499
- Joined: 28 Feb 2015, 13:11
- Location: Hof, Bayern, Germany
Re: Two zeros are not equal
Hi Yasser,
I can only upload up to 3 images in a single post… ( , and I have not yet figured out how to merge images )
So, I Edited to put the first two images into the last on my posts http://www.eileenslounge.com/viewtopic. ... 77#p243975" onclick="window.open(this.href);return false;
Here in this post I have the third and forth images.
( Also I have attached a Word document which has all these as images in it :
Something To Click On XL 2003.JPG : https://imgur.com/KxTlv2a" onclick="window.open(this.href);return false;
Click On It XL2003.JPG : https://imgur.com/2XdeHAP" onclick="window.open(this.href);return false;
Change To Number XL2003.jpg : https://imgur.com/ahJHBox" onclick="window.open(this.href);return false; , https://imgur.com/FkyZkL3" onclick="window.open(this.href);return false;
ist True XL2003.jpg : https://imgur.com/AI2creA" onclick="window.open(this.href);return false;
Something To Click On XL 2007.JPG : https://imgur.com/byN3zRu" onclick="window.open(this.href);return false; https://imgur.com/tfAEM5e" onclick="window.open(this.href);return false;
Click on It XL2007.jpg : https://imgur.com/AfmDQ5J" onclick="window.open(this.href);return false;
Change To Number XL 2007.jpg : https://imgur.com/nGQ4WPu" onclick="window.open(this.href);return false;
Now it is True XL2007.JPG : https://imgur.com/bKyyDtl" onclick="window.open(this.href);return false;
Something to click on XL 2010.JPG : https://imgur.com/SzJaScv" onclick="window.open(this.href);return false;
Click on it XL2010.JPG : https://imgur.com/3L0GvN8" onclick="window.open(this.href);return false;
Change to number XL2010.JPG : https://imgur.com/k9JaOaT" onclick="window.open(this.href);return false;
Now it is True XL 2010.JPG : https://imgur.com/1kKnrwi" onclick="window.open(this.href);return false; https://imgur.com/tSeuDBX" onclick="window.open(this.href);return false; )
Word File "Something To Click On.docx" : https://app.box.com/s/n0uzzt7cny8e34peuatlbr0fau45k4rh" onclick="window.open(this.href);return false;
_.______________________
I can only upload up to 3 images in a single post… ( , and I have not yet figured out how to merge images )
So, I Edited to put the first two images into the last on my posts http://www.eileenslounge.com/viewtopic. ... 77#p243975" onclick="window.open(this.href);return false;
Here in this post I have the third and forth images.
( Also I have attached a Word document which has all these as images in it :
Something To Click On XL 2003.JPG : https://imgur.com/KxTlv2a" onclick="window.open(this.href);return false;
Click On It XL2003.JPG : https://imgur.com/2XdeHAP" onclick="window.open(this.href);return false;
Change To Number XL2003.jpg : https://imgur.com/ahJHBox" onclick="window.open(this.href);return false; , https://imgur.com/FkyZkL3" onclick="window.open(this.href);return false;
ist True XL2003.jpg : https://imgur.com/AI2creA" onclick="window.open(this.href);return false;
Something To Click On XL 2007.JPG : https://imgur.com/byN3zRu" onclick="window.open(this.href);return false; https://imgur.com/tfAEM5e" onclick="window.open(this.href);return false;
Click on It XL2007.jpg : https://imgur.com/AfmDQ5J" onclick="window.open(this.href);return false;
Change To Number XL 2007.jpg : https://imgur.com/nGQ4WPu" onclick="window.open(this.href);return false;
Now it is True XL2007.JPG : https://imgur.com/bKyyDtl" onclick="window.open(this.href);return false;
Something to click on XL 2010.JPG : https://imgur.com/SzJaScv" onclick="window.open(this.href);return false;
Click on it XL2010.JPG : https://imgur.com/3L0GvN8" onclick="window.open(this.href);return false;
Change to number XL2010.JPG : https://imgur.com/k9JaOaT" onclick="window.open(this.href);return false;
Now it is True XL 2010.JPG : https://imgur.com/1kKnrwi" onclick="window.open(this.href);return false; https://imgur.com/tSeuDBX" onclick="window.open(this.href);return false; )
Word File "Something To Click On.docx" : https://app.box.com/s/n0uzzt7cny8e34peuatlbr0fau45k4rh" onclick="window.open(this.href);return false;
_.______________________
You do not have the required permissions to view the files attached to this post.
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also
You can find me at DocAElstein also
-
- PlatinumLounger
- Posts: 4931
- Joined: 31 Aug 2016, 09:02
Re: Two zeros are not equal
May be have all the images in one folder and compress to ZIP then upload it .. You can rename each image during the explanation