SharePoint Custom List Calculated Value ?

I Have a SP 2010 custom list and I am trying to created a calculated variable that is the first character of an existing filed IF the field does not start with "D"

here is my current calculated field formula

=LEFT([Q2 Score],1)

I need to add something that sets "D" to "0" when the first character is "D"
Matt PinkstonEnterprise ArchitectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jamie McAllister MVPSharePoint ConsultantCommented:
I reckon if you keep your formula, but put that in a Replace function to handle the case where first character is D that should do it;

The function takes these args;


So I believe this should meet the requirement;

=REPLACE(LEFT([Q2 Score],1),1,1,"0")
Matt PinkstonEnterprise ArchitectAuthor Commented:
went with

=IF(LEFT([Q2 Score],1)="D","0",LEFT([Q2 Score],1)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Matt PinkstonEnterprise ArchitectAuthor Commented:
it was the best solution
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.