Testing for #VALUE

User avatar
Abraxus
3StarLounger
Posts: 263
Joined: 01 Mar 2010, 17:34
Location: Blue Springs, MO

Testing for #VALUE

Post by Abraxus »

I have an Excel spreadsheet that holds a table updated by Power Query.

Some of the returned cells are empty. If I try to get the value of those cells, I get #VALUE.

That's ok, but I need to test those cells to see if:
  • The cell = 0
  • The cell hold a numeric value
How can I test those cells to see if they are 0 or not without getting #VALUE on the rows with nothing in that field?
Morgan

User avatar
HansV
Administrator
Posts: 79321
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Testing for #VALUE

Post by HansV »

Perhaps you can use the IFERROR function.

Otherwise: could you attach a small sample workbook demonstrating the problem without sensitive/proprietary data?
Best wishes,
Hans

User avatar
Abraxus
3StarLounger
Posts: 263
Joined: 01 Mar 2010, 17:34
Location: Blue Springs, MO

Re: Testing for #VALUE

Post by Abraxus »

Let's try this. You can see in the last column that testing for 0 isn't working.
You do not have the required permissions to view the files attached to this post.
Morgan

User avatar
HansV
Administrator
Posts: 79321
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Testing for #VALUE

Post by HansV »

You could use

=IF(IFERROR(VALUE([@[CO_Amend_Value]]),1)=0,"True","False")

or

=IF([@[CO_Amend_Value]]="", "False", IF(VALUE([@[CO_Amend_Value]])=0,"True","False"))

or even

=IFERROR(VALUE([@[CO_Amend_Value]])=0,FALSE)
Best wishes,
Hans