SOLVED

New Contributor

Function IF

Hello,

I need help with this function.
I'm trying to relate the IF function to a list with VLOOKUP entries.

I want to know if certain entries of certain words appear on the list.

I tried this for exemple:
=IF(C4:C999="Travel";"-5";"0")
where C4:C999 is the collum with the VLOOKUP entries
Travel is the entry i want to relate to "-5"

6 Replies
best response confirmed by gandriol (New Contributor)
Solution

Re: Function IF

Perhaps you mean

``=IF( COUNTIF(C4:C999,"Travel"),-5, 0)``

Re: Function IF

=IF(COUNTIF(C4:C999,"Travel")>0,"-5","0")

Re: Function IF

Hello,
Its doesn't work. My office is in Portuguese, we use ";" instead of ","
If i use =IF(C4="Travel","-5","0") it relates to entries only the C4 cell.
My objective is to detect if there is any "Travel" entries in C4:C999

Re: Function IF

=SE(CONTAR.SE(C4:C999;"Travel")>0;"-5";"0") Portugal
=SE(CONT.SE(C4:C999;"Travel")>0;"-5";"0") Brasil

Re: Function IF

It worked, Thanks for helping me!

Re: Function IF

@gandriol , you are welcome