SOLVED

# IF(OR(reconzige only first characters...)

Copper Contributor

# IF(OR(reconzige only first characters...)

Hi All,

Is it possible to use an IF Argument only to recognise the first consistent part of a cell content(text) when the cell content slightly varies at the end?

=IF(OR(E2="PAYMENT TO NRMA 20048",E2="PAYMENT TO NRMA 20047",E2="PAYMENT TO NRMA  20046"),D2,"")

2 Replies

# Re: IF(OR(reconzige only first characters...)

@Unkeith -Does this work ? - Vlookup with wildcard

``````=VLOOKUP("PAYMENT TO NRMA"&"*",A2:D4,4,0)
=XLOOKUP("PAYMENT TO NRMA"&"*",A2:A4,D2:D4,,2)``````

best response confirmed by Unkeith (Copper Contributor)
Solution

# Re: IF(OR(reconzige only first characters...)

As a variant:

If it's always the first 20 characters that are the same, then this formula works just fine.

``=IF(LEFT(E2,20)="payment to nrma 2004",D2,"")``

If you are not sure where in the text the particular text string may be, try this:

``=IF(SEARCH("payment to nrma 2004",E2),D2,"")``

1 best response

Accepted Solutions
best response confirmed by Unkeith (Copper Contributor)
Solution

# Re: IF(OR(reconzige only first characters...)

As a variant:

If it's always the first 20 characters that are the same, then this formula works just fine.

``=IF(LEFT(E2,20)="payment to nrma 2004",D2,"")``

If you are not sure where in the text the particular text string may be, try this:

``=IF(SEARCH("payment to nrma 2004",E2),D2,"")``