Entering a "result" text value if a range of adjacent cells contains any text

davestephsamem

New Member
Joined
Mar 3, 2012
Messages
34
Hi,
I have a sheet that contains a timetable for a school - 16 class columns and 33 lesson rows. This "master" timetable is then sent to individual tabs for each teacher's individual timetable.
This results in a timetable that has one cell in each of the 16 rows with text that corresponds to their lesson title: they can't be in two places at once.
On occasions when there is no text within a row the teachers are "free" - I would like to have a mechanism where these "frees" are indicated. I was thinking of a formula in column 17 that does the job of "if there is any text in (e.g.) A1:P1 return nothing, otherwise return "free"". I sort of managed it - but it spills...

Thanks

Dave
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
=COUNTBLANK(A1:P1)
=IF(COUNTBLANK(A1:P1)>0,"Free","")

Various.xlsx
ABCDEFGHIJKLMNOPQ
11111111111111111 
2Free
3111111111111111Free
Sheet15
Cell Formulas
RangeFormula
Q1:Q3Q1=IF(COUNTBLANK(A1:P1)>0,"Free","")
 
Upvote 0
Hi, thanks for this. I may have not explained myself very well - this almost works but I'm looking for a solution that only gives me "free" on "row 5" of this example...
1645969092595.png
 
Upvote 0
your example goes from column D to Column T
is that the most colums ?

in my example just change to
=IF(COUNTA(A1:P1)>0,"","Free")
OR for you image
=IF(COUNTA(D1:T1)>0,"","Free")

Various.xlsx
ABCDEFGHIJKLMNOPQRS
1english1english2english3english4english5english6english7english8english9english10english11english12english13english14english15english16 16
2Free0
3english1 1
Sheet15
Cell Formulas
RangeFormula
Q1:Q3Q1=IF(COUNTA(A1:P1)>0,"","Free")
S1:S3S1=COUNTA(A1:P1)


FYI
Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
 
Upvote 0
Hi again - I'm really grateful for your input on this. I've uploaded a mini-sheet - the formula is not quite doing what I need it to: I wonder if it's because the cells are linked to another sheet?
Copy of Copy of Copy of Copy of Copy of 2023 timetable 8.xlsx
ABCDEFGHIJKLMNOPQRSTU
1KS3 /KS4/KS57778BR8Mc8B9Bu9Mc9HH10BR10S10Cr11A11BPost 16 Post 16Post 16
2Monday1English                 
32    English             
43        English         
54         English        
65         RE        
76                  
87         English        
Daisy Brown
Cell Formulas
RangeFormula
D2:T2D2=IF(Master!F$3="DB","English","")
U2:U8U2=IF(COUNTA(D2:T2)>0,"","Free")
D3:T3D3=IF(Master!F$5="DB","English","")
D4:T4D4=IF(Master!F$7="DB","English","")
D5:T5D5=IF(Master!F$9="DB","English","")
D6:T6D6=IF(Master!F$11="DB","RE","")
D7:T7D7=IF(Master!F$13="DB","English","")
D8:T8D8=IF(Master!F$15="DB","English","")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:T34Celldoes not contain a blank value textNO
D2:T34Cell Valuecontains ""*""textNO
 
Upvote 0
yes, it because it has a formula in
so you could use
=COUNTIF(D2:T2,"")
IF(COUNTIF(D2:T2,"")=17, "free","")

the 17 are the number of columns in the range D to T

should be able to do something with blanks but not formulas

anyway try

IF(COUNTIF(D2:T2,"")=17, "free","")
 
Upvote 0
Solution
you are welcome,
i have not looked at simplifying it so that you do not need to know the exact number of columns
But of that now works ok, i wont do any more work, unless its a problem in the future as you apply it
 
Upvote 0

Forum statistics

Threads
1,215,248
Messages
6,123,877
Members
449,130
Latest member
lolasmith

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