Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Green triangle - text fields don't match.

I have 2 cells B1 and C1. They both show a value of 1002. They are both
formatted as text fields. The LEN function returns 4 for each cell. I do a
=CODE(LEFT(B1,1)) and get a value of 49. The same for cell C1. I check the
Middle 2 chars and the last character and they match exactly. BUT the
=IF(B1=C1,1,2) returns a 2 - the cells don't match. B1 shows a green
triangle in the upper left so I think it's related to the format but I'm
stumped. Thanks for any help you can provide.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Green triangle - text fields don't match.

That's the way it is, real nums < text nums
Instead of: =IF(B1=C1,1,2)
You could use: =IF(B1+0=C1+0,1,2) as the test
where the +0 will coerce text nums, if any, to real nums for correct
numerical computation. Source real nums will not be impacted in value by the
"+0".
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"dhstein" wrote:
I have 2 cells B1 and C1. They both show a value of 1002. They are both
formatted as text fields. The LEN function returns 4 for each cell. I do a
=CODE(LEFT(B1,1)) and get a value of 49. The same for cell C1. I check the
Middle 2 chars and the last character and they match exactly. BUT the
=IF(B1=C1,1,2) returns a 2 - the cells don't match. B1 shows a green
triangle in the upper left so I think it's related to the format but I'm
stumped. Thanks for any help you can provide.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Green triangle - text fields don't match.

One must be entered as '1002 which makes it text
the other as 1002 which makes it a number hence not the same...

This will pass the tests you perfomed.

If you click on the green arrow it will tell you that 'Number stored as text'

"dhstein" wrote:

I have 2 cells B1 and C1. They both show a value of 1002. They are both
formatted as text fields. The LEN function returns 4 for each cell. I do a
=CODE(LEFT(B1,1)) and get a value of 49. The same for cell C1. I check the
Middle 2 chars and the last character and they match exactly. BUT the
=IF(B1=C1,1,2) returns a 2 - the cells don't match. B1 shows a green
triangle in the upper left so I think it's related to the format but I'm
stumped. Thanks for any help you can provide.

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 eliminate the green triangle throughout my spreadsheet? Patrick Traynor Excel Discussion (Misc queries) 5 April 5th 23 01:10 PM
What is the little green triangle??? mscertified Excel Worksheet Functions 1 September 19th 07 06:39 PM
How do I eliminate the green triangle throughout my spreadsheet? Patrick Traynor Excel Discussion (Misc queries) 2 September 6th 06 06:10 AM
Green Triangle in Cell M. B. Collins Excel Discussion (Misc queries) 4 August 8th 06 01:46 AM
I am getting Green triangle on one column in all the cells ? nach New Users to Excel 2 December 14th 04 10:03 PM


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