# Index/Match statement with OR operator

#### dbarbella

##### New Member
Hi all,
I need to enhance the formula:
=IF(INDEX('Salesforce Combined Data'!\$P\$3:\$P\$9999,MATCH(\$B4,'Salesforce Combined Data'!\$C\$3:\$C\$9999, 0))<>"","*","")

Right now, it checks if there is a value in a cell on another sheet.
If so, instead of showing the actual value, it shows an asterisks (leave blank if no value in the cell from the other sheet).

I'm very stuck working out the syntax for this evolution.
I need the same formula to check if there is a value in either of 2 columns from that other sheet.

So
If a value exists in either
'Salesforce Combined Data'!\$P\$3:\$P\$9999
OR
'Salesforce Combined Data'!\$T\$3:\$T\$9999
<Then the rest is all the same>

What is the proper syntax to achieve that?

Thanks so much for any help
-Dave

### Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

#### dbarbella

##### New Member
I came up with a solution using nested If statements. Not sure if this is the best approach, but at least it's working for now:
=IF(INDEX('Salesforce Combined Data'!\$R\$3:\$R\$9999,MATCH(\$B14,'Salesforce Combined Data'!\$C\$3:\$C\$9999, 0))<>"","*"
,IF(INDEX('Salesforce Combined Data'!\$V\$3:\$V\$9999,MATCH(\$B14,'Salesforce Combined Data'!\$C\$3:\$C\$9999, 0))<>"","*"
,""))

#### Norie

##### Well-known Member
Here's how you could do it with OR.

=IF(OR(INDEX('Salesforce Combined Data'!\$R\$3:\$R\$9999,MATCH(\$B14,'Salesforce Combined Data'!\$C\$3:\$C\$9999,0))<>"",INDEX('Salesforce Combined Data'!\$V\$3:\$V\$9999,MATCH(\$B14,'Salesforce Combined Data'!\$C\$3:\$C\$9999,0))<>""),"*","")

Replies
3
Views
88
Replies
2
Views
91
Replies
8
Views
106
Replies
2
Views
139
Replies
1
Views
66