Z
Z
zimbura2020-09-28 13:01:06
Google Sheets
zimbura, 2020-09-28 13:01:06

What is the correct way to use IF with OR operator on an array?

Hello
There is one table in which phone numbers, you need to substitute names for them.
On the other sheet "contacts" there are contacts, each contact has 2 columns with phones. One of the phones is full or 2 are full
, tell me how to use the OR operator (or) in the formula
=IF(OR($B2='contacts'!$C$2:C;$B2='contacts'!$D$2:$D) ;"no such";'contacts'!$B$2:$B)

In column B on the current sheet, the phone is in the format 71111111111
In columns C and D on the sheet "contacts", the phone is in the format 71111111111
in column B on the sheet "contacts"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Noir, 2020-09-28
@zimbura

=arrayformula( if(or('contacts'!$C$2:C=$B2;'contacts'!$D$2:$D=$B2);"no such";'contacts'!$B$2:$B ))

A
Alexander, 2020-09-28
@ForestAndGarden

Without ARRAYFORMULA!
Left VLOOKUP taken from planetaexcel.ru by Nikolai Pavlov:
For cell C2:

=IF(ISERROR(INDEX('контакты'!B$2:B;
(MATCH(B2;'контакты'!C$2:C;0))));IFERROR(INDEX('контакты'!B$2:B;
(MATCH(B2;'контакты'!D$2:D;0)));"нет таких");INDEX('контакты'!B$2:B;
(MATCH(B2;'контакты'!C$2:C;0))))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question