If Function

Oli2509

New Member
Hello All,

Can someone please help me on a sheet that i am working on for a headcount, i have several arguments like Present, Local Leave, not reachable etc and i am using if function e.g: "=IF(C2="On Way xxxxx",1,"") and "=IF(C2="On Site XXXX",1,"") whereas "XXXX" is a different place and same is not working, can someone please help me.

Thanks,

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

etaf

Well-known Member
=IF( OR(Left(C2,6)="on way", Left(C2,7)="on site") , 1 ,"")

is ON a common text for where you want a 1

=IF( Left(C2,2)="on" , 1 ,"")

Last edited:

Oli2509

New Member
Dear Wayne,

Thank you for the formula, however i got one column for On Site and the other one for on way as and when i'm trying the formula i am having the same counts.

 Status On Way On_Site On Way Coroi 1 1 On Site MCB 1 1 Not Reachable On Way Eclosia 1 1 P P On Way Terra 1 1 Local Not Reachable P Local Local Local Local On Way Terra 1 1 On Site MCB 1 1 On Site Eclosia 1 1 On Way CJCO 1 1 On Way Darne 1 1

<colgroup><col><col span="2"></colgroup><tbody>
</tbody>

etaf

Well-known Member
then you need a different formula

in the on way column use
=IF( Left(C2,6)="on way" , 1 ,"")

in the on site column
=IF( Left(C2,7)="on site" , 1 ,"")

Replies
0
Views
40
Replies
6
Views
120
Replies
3
Views
94
Replies
17
Views
170
Replies
2
Views
60