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.

AB C
11=$A$1:$A$5
22
3=VALUE("THREE")
44
55

<tbody>
</tbody>

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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,215,059
Messages
6,122,913
Members
449,093
Latest member
dbomb1414

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