inserting text in front and behind a value

lefty38

Board Regular
Joined
Oct 27, 2005
Messages
85
what formula would i use to achieve the results in column B2:B6

not sure how to incorporate the "==" or the extra ")" "{"

if (ID == 'A2') {'SPC'} else

excel 2003 is what it is needed for

Excel 2007<table rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6" cellpadding="2.5px"><colgroup><col style="background-color: #E0E0F0" width="25px"><col><col></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th>
</th><th>A</th><th>B</th></tr></thead><tbody><tr><td style="color: #161120;text-align: center;">1</td><td style=";">ID</td><td style=";">Code Desired Output
</td></tr><tr><td style="color: #161120;text-align: center;">2</td><td style=";">1940</td><td style=";">if (ID == '1940') {'SPC'} else</td></tr><tr><td style="color: #161120;text-align: center;">3</td><td style=";">6652</td><td style=";">if (ID == '6652') {'SPC'} else</td></tr><tr><td style="color: #161120;text-align: center;">4</td><td style=";">53228</td><td style=";">if (ID == '53228') {'SPC'} else</td></tr><tr><td style="color: #161120;text-align: center;">5</td><td style=";">83839</td><td style=";">if (ID == '53839') {'SPC'} else</td></tr><tr><td style="color: #161120;text-align: center;">6</td><td style=";">63442</td><td style=";">if (ID == '63442') {'SPC'} else</td></tr><tr><td style="color: #161120;text-align: center;">7</td><td style=";">176768</td><td style=";">if (ID == '176768') {'SPC'} else</td></tr><tr><td style="color: #161120;text-align: center;">8</td><td style=";">2295028</td><td style=";">if (ID == '2295028') {'SPC'} else</td></tr></tbody></table>
Sheet1

As always thank you
 
Last edited:

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

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