Add specific value depending on the cell text

Miguelluis

New Member
Joined
Jan 29, 2013
Messages
45
Hi,
I'm trying to set up a holiday spreadsheet where I want it to add 1 if a cell contains the text "AL" and add 0.5 if the cell contains the text HD.

I <gs id="ee443cc7-e45f-4547-9ea8-7dac38435b9a" ginger_software_uiphraseguid="fb07d914-4a5e-40c1-b1b3-a34425f7f08b" class="GINGER_SOFTWARE_mark">sounds</gs> so <gs id="8c79adbb-d5c4-4c1f-ae6b-a16cb803cf08" ginger_software_uiphraseguid="fb07d914-4a5e-40c1-b1b3-a34425f7f08b" class="GINGER_SOFTWARE_mark">simple but</gs> I can't find a formula that works.

Can you help?

Kind regards
Miguel
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
welshgasman;4725497<gs id="0c80f91e-eeb8-4471-928a-cf6852659a21" ginger_software_uiphraseguid="d14f4e97-d439-4de0-af90-a821ac07bdd5" class="GINGER_SOFTWARE_mark"> said:
</gs>=countif<gs id="2c6aba47-3539-4409-9705-acc07b6b1ffa" ginger_software_uiphraseguid="d14f4e97-d439-4de0-af90-a821ac07bdd5" class="GINGER_SOFTWARE_mark">(</gs><range>,"AL"<gs id="399ef092-e827-447c-b73e-e2fe329b31de" ginger_software_uiphraseguid="d14f4e97-d439-4de0-af90-a821ac07bdd5" class="GINGER_SOFTWARE_mark">)</gs>+countif<gs id="91e103e7-2dff-4187-a3a0-62c175a19d31" ginger_software_uiphraseguid="d14f4e97-d439-4de0-af90-a821ac07bdd5" class="GINGER_SOFTWARE_mark">(</gs><range>,"HD"<gs id="8614701a-7ca5-4181-ac8a-2b64a19ea175" ginger_software_uiphraseguid="d14f4e97-d439-4de0-af90-a821ac07bdd5" class="GINGER_SOFTWARE_mark">)</gs>/2<gs id="e9c48d00-a634-4340-967c-8c35393c425d" ginger_software_uiphraseguid="d14f4e97-d439-4de0-af90-a821ac07bdd5" class="GINGER_SOFTWARE_mark">[</gs>/QUOTE]

Thank you, worked a treat!</range></range>
 
Upvote 0

Forum statistics

Threads
1,215,231
Messages
6,123,756
Members
449,120
Latest member
Aa2

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