baffling excel problem where some 2s are different

  bemuzed 15:52 10 Feb 2005
Locked

I have a worksheet where an IF statement refers to a value in another cell. The value referred to is either 1 or 2. However, on some of the 2 values I get a VALUE error as the result.I have made sure all cells are formatted the same but I can only get rid of the VALUE error if instead of 2 I type "2" into the offending cell. If I type "2" inot all the 2 cells then cells that previously did not produce an error now do. Why are some 2s different form other 2s? It's driving me crazy

  pj123 16:00 10 Feb 2005

Are you sure they are all formatted the same? If you have to use inverted commas that makes me think that some of them are formatted as text.

Click on one of the error cells and check the formatting.

  rogertjj 16:01 10 Feb 2005

This may be because Excel is reading the value of the cell as text, rather than a value.


Try amending your IF formula so that instead of :


=IF(A1=2,"true","false") it reads


=IF(VALUE(A1)=2,"true","false")


If that doesn't work, I am sure VoG™ will provide the answer.

  bemuzed 09:06 11 Feb 2005

rogertjj
thnaks. Using the VALUE function solved it.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

Inside the iMac Pro - Apple's most powerful Mac yet

iMac Pro release date, UK price & specs

Comment nettoyer Windows et optimiser son PC gratuitement ?