Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell-format and comparison
Hi,
I have a lot of cells with numbers. Sometimes, Excel interprets these cells as text. In the debugger, I get this ?Val([gPD]) < Val([gPD_Count]) False ?[gPD] < [gPD_Count] True So, If I convert the named cells to values, everything works fine, but not always if I don't. Thus this means I have to change my code for every named cell to Val([Cell]), or is there another way? As I said, I have a lot of named cells with numbers, and a lot of code to check. Why does Excel not sea that it's a number? (Sometimes, I pasted a lot of numbers programmatically in a sheet, and then, Excel misinterprets!) Thanks Jos Vens |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell-format and comparison
It's because the cells are formatted as text. You may be able to fix i
by just formatting everything as general rather than modifying you code. -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell-format and comparison
Hi,
I just think that the general-format is wrong (see my comparison in the debugger) and I have to have the format Number (I compare numbers) for the named cells that I compare. I cannot format everything into numbers. Jos "kkknie " schreef in bericht ... It's because the cells are formatted as text. You may be able to fix it by just formatting everything as general rather than modifying your code. K --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets | Excel Discussion (Misc queries) | |||
Insert a value in a cell based upon a comparison of cell values in 2 separate worksheets | Excel Worksheet Functions | |||
How do I format a formula to recognize multiple comparison factors | Excel Worksheet Functions | |||
cell comparison | New Users to Excel | |||
If then Cell comparison with text. | Excel Programming |