IF specific text, then CONCATENATE

Lizabeta

New Member
Joined
Oct 24, 2008
Messages
32
This formula keeps giving me an error and I can't tell if its my logical test or parentheses (or something else) that is causing it...

IF J12 has the text "IEP" in it, I want it to concatenate the first part...
If J12 has anything else except IEP in it, I want it to concatenate the second part:



=IF(J12="IEP"), (CONCATENATE("PPS"," ",TEXT(C62,"mm-dd-yyyy")," ", E62," ",D62)), (CONCATENATE("SP"," ",TEXT(C62,"mm-dd-yyyy")," ", E62," ",D62))


It should be an easy one, but my brain is stuck in Monday
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi

The issue is your first closing parenthesis. I think this should fix it:

=IF(J12="IEP",CONCATENATE("PPS"," ",TEXT(C62,"mm-dd-yyyy")," ", E62," ",D62), CONCATENATE("SP"," ",TEXT(C62,"mm-dd-yyyy")," ", E62," ",D62))

HTH
DK
 
Upvote 0
Hi,

Untested but try:

=IF(J12="IEP",CONCATENATE("PPS"," ",TEXT(C62,"mm-dd-yyyy")," ", E62," ",D62),CONCATENATE("SP"," ",TEXT(C62,"mm-dd-yyyy")," ", E62," ",D62))

Cheers,
Ian
 
Last edited:
Upvote 0
Hi,

Top tip..... when you are having problems with a formula like this, click on the cell where the formula is then click on the formula bar so your cursor is at the start of the "=" sign. Move cursor with right arrow and this will "step" through the formula and you may see where for example, the parenethesis are in the wrong place as the formula sections are "displayed" in bold font below......

Hard to explain but give it a try:)

HTH
Ian
 
Upvote 0
This should do the same thing:

=IF(J12="IEP","PPS","SP")&TEXT(C62," mm-dd-yyyy ")&E62&" "&D62
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,792
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top