If then statement in SharePoint 2010

I need to know exactly have to write this statement in SharePoint
Background.  I need 2 separate columns to populate dates if another column is NOT blank

for the MM Start column, I need it to populate a certain date based on [A2] not blank
MM Start Column
If [New MM ID] is not blank and [Comments]="add", then "4/27/2015"
If [New MM ID] is not blank and [Comments] = "remove", then " "

MM End column
If [New MM ID] is not blank and [Comments]="add", then "12/31/9999"
If [New MM ID] is not blank and [Comments] = "remove", then "4/27/2015"
If New is blank, I need for MM Start and MM End to stay blank

New MM ID               Comments       MM Start       MM End
test                               add                    4/27/2015     12/31/9999
test                               remove                                      4/27/2015
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.

Rainer JeschorCommented:
assuming you are talking about the formulas for calculated fields then here we go:
MM Start calculation formula
=IF(TRIM([New MM ID]) = "","",IF(LOWER([Comments])="add","4/27/2015",IF(LOWER([Comments])="remove"," ","")))

Open in new window

MM End calculation formula:
=IF(TRIM([New MM ID]) = "","",IF(LOWER([Comments])="add","12/31/9999",IF(LOWER([Comments])="remove","4/27/2015","")))

Open in new window


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
ablove3Author Commented:
Thank you Rainer for such a quick turnaround.  The formula did exactly what I needed
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.