0

I have the following data in a text column called [Workcenter]

1 SOCS

CSS

SCXP

SCQA

SCOO

SCPR

I need a formula which will create the following results

CC

CC

SCX

SCQ

SCO

SCP

I'm trying to combine these 2 working formulas

=IF([Workcenter]="1 SOCS","CC",IF([Workcenter]="CSS","CC"))

=LEFT([Workcenter],LEN([Workcenter])-1)

I tried this formula without success

=IF(Workcenter="1 SOCS","CC",IF(Workcenter="CSS","CC"(=LEFT([Workcenter],LEN([Workcenter])-1))))

Any ideas?

0

2 Answers 2

0

Equals ("=") just means a formula follows. You one need one per formula. Try removing the extra equal sign in front of the LEFT.

=IF(Workcenter="1 SOCS","CC",IF(Workcenter="CSS","CC", (LEFT([Workcenter],LEN([Workcenter])-1))))

A more neatly formatted version:

=IF(
    Workcenter="1 SOCS","CC",
    IF(
       Workcenter="CSS","CC",
       LEFT([Workcenter],LEN([Workcenter])-1)
    )
 )
3
  • I tried your suggestion. I also tried, no luck: =IF(Workcenter="1 SOCS","CC",IF(Workcenter="CSS","CC"(LEFT(Workcenter,LEN(Workcenter)-1))))
    – Joe
    Sep 21, 2018 at 18:11
  • What was the error? Would it save the formula, but display the correct results. (I'll go and create a test list...) Sep 21, 2018 at 18:18
  • You were missing a comma, just before "(LEFT". I fixed in the answer above. Sep 21, 2018 at 18:23
0

Thanks for the help Mike! This is what I have working:

=IF(OR([Workcenter]="1 SOCS",[Workcenter]="CSS"),"CC",LEFT([Workcenter],LEN([Workcenter])-1))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.