If #value! In an array then substitute #value!?

MEUserII

Board Regular
Joined
Oct 27, 2017
Messages
91
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
Platform
  1. Windows
Consider the following table.

[TABLE="width: 200"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"] C [/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]=$A$1:$A$5[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]=VALUE("THREE")[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]

If the range is taken from: $A$1:$A$5, and that range is represented as an array in B1 using the formula entered: =$A$1:$A$5; which is equal to the array: {1; 2; #VALUE!; 4 ;5} (when pressing F9 to view full cell contents); then is there a way to substitute the "#VALUE!" element in this array?

In other words, substitute the "#VALUE!" from {1; 2; #VALUE!; 4; 5} to {1; 2; X; 4; 5}; where "X" represents what is substituted for the "#VALUE!" error?

For reference, this question builds on the useful information provided in this thread: https://www.mrexcel.com/forum/excel-questions/1084361-if-value-then-action.html
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Maybe...

=IFERROR(IF(ERROR.TYPE(A1:A5)=3,"X"),A1:A5)

M.
Yes, this works! Thank you for the guidance.

For reference I rewrote the formula, so it's a bit clearer: =IFERROR( (IF( ( (ERROR.TYPE($A$1:$A$5) )=(3) ), ("X") ) ), ($A$1:$A$5) ); which accomplishes taking the range input/array of, {1, 2, #VALUE!, 4, 5}, and creating the array: {1, 2, "X", 4, 5}.

Specifically, when applying this formula for the value: "X"=3; it takes on the form: =IFERROR( (IF( ( (ERROR.TYPE($A$1:$A$5) )=(3) ), (3) ) ), ($A$1:$A$5) ); which accomplishes creating the array: {1, 2, 3, 4, 5}.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,997
Messages
6,175,871
Members
452,679
Latest member
darryl47nopra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top