if either column contains specific text add a word to another column..

IsabellaLearning

Board Regular
Joined
May 23, 2009
Messages
115
Hi all,


I am doing a roster to cover sleepovers at mums place as she is unwell.


Column C contains my brothers availability
Column D contains my availability
availability is text "Sleep @ Mums"


In Column E I want to add the text"COVERED" IF either column C OR column D contains the text "Sleep @ Mums"
Also if both column C and column D contain "sleep at mums" on same line" text to say "duplicate"

Would be most appreciative!

Thanks
Izzy
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi, here is one possibility:


Excel 2013
CDE
2Sleep @ MumsSleep @ MumsDuplicate
3Sleep @ MumsCovered
4Not Covered
Sheet1
Cell Formulas
RangeFormula
E2=CHOOSE(COUNTIF(C2:D2,"Sleep @ Mums")+1,"Not Covered","Covered","Duplicate")
 
Upvote 0
In cell E1, enter the following formula and close it with Ctrl + Shift + Enter in stead of just Enter (it's an array formula) and drag it down.

Code:
=CHOOSE(SUM(--ISTEXT(C1:D1))+1,"Not Covered","Covered","Duplicate")

I'm assuming you want something like "Not Covered" in rows with no entries in either column C or D. If you just want it to be blank, remove the actual text between the double quotation marks in the formula.
 
Upvote 0
Hi, here is one possibility:

Excel 2013
CDE
2Sleep @ MumsSleep @ MumsDuplicate
3Sleep @ MumsCovered
4Not Covered

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
E2=CHOOSE(COUNTIF(C2:D2,"Sleep @ Mums")+1,"Not Covered","Covered","Duplicate")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>


absoutely perfect - thankyou so much - i feel like i have been attempting the basics and getthign them wrong for years - i really appreciate your help! thankyou and have a gorgeous weekend!

Izzy
 
Upvote 0
Thankyou also Mathias - the 2 of you have my roster on track and another worry of my mind - im greatful and youve made my day!
 
Upvote 0
Hi Izzy, glad that we were able to help out a little :)
 
Upvote 0

Forum statistics

Threads
1,213,492
Messages
6,113,967
Members
448,537
Latest member
Et_Cetera

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