Muhammad Naeem
Muhammad Naeem

Reputation: 11

Comparing with =IFERROR(IF(VALUE.. with 2 Phone Numbers columns

I am messing with =IFERROR(IF(VALUE(LEFT()) and can't solve it after spending a whole night (my bad). I want auto generated result like below picture.

Solution will be like this enter image description here

  1. If A2 and B2 have different number, Expected Result should be B2.
  2. If B3 is empty or having no value, Expected Result should be be A1.
  3. If A4 and B4 have same value, Expected Result should be any of them.
  4. If B2 have Fax #, Expected Result should be A5.

I am currently using

=IFERROR(IF(VALUE(LEFT(B2,1)),IF(A2=B2,A2,B2),A2),B2)

as an array formula, but can't get the required results. I mess with array and looking for another simple solution.

Upvotes: 1

Views: 89

Answers (1)

user4039065
user4039065

Reputation:

Try,

=if(isnumber(--left(b2)), b2, a2)

If you only want the single left-most character/digit from a string, you don't need the 1.

Upvotes: 3

Related Questions