Filling Blank Cells in Row based on other Cells in Range - help!

%3CLINGO-SUB%20id%3D%22lingo-sub-1136101%22%20slang%3D%22en-US%22%3EFilling%20Blank%20Cells%20in%20Row%20based%20on%20other%20Cells%20in%20Range%20-%20help!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1136101%22%20slang%3D%22en-US%22%3E%3CP%3ELawd%20-%20this%20one%20has%20consumed%20way%20too%20much%20of%20my%20time%2C%20and%20somewhere%20in%20my%20brain%2C%20I'm%20convinced%20this%20isn't%20as%20difficult%20as%20I'm%20making%20it.%20However%2C%20I%20feel%20like%20I've%20tried%20every%20combination%2C%20and%20pieces%20of%20the%20final%20answer%20have%20appeared%2C%20but%20alas%2C%20never%20together.%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20the%20setup%20and%20issue%3A%3C%2FP%3E%3CP%3EI%20have%20an%20attendance%20sheet%20that%20will%20be%20filled%20in%20by%20facilitators%20for%20a%2025-day%20class.%20Columns%20A%2FB%20are%20Last%2FFirst%2C%20and%20C%3AAA%20are%20the%20actual%20days%20of%20the%20class.%20Cells%20in%20C%3AAA%20are%20data%20validated%20to%20only%20be%20the%20codes%20we%20recognize%20(P%2C%20A%2C%20T%2C%20F%2C%20R%2C%20Pf%2C%20X).%20The%20Columns%20are%20fixed%2C%20but%20the%20rows%20aren't%20-%20they%20will%20flex%20based%20on%20class%20size.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20I%20want%20to%20happen%20is%20if%20a%20facilitator%20gets%20to%20day%204%20(column%20F)%2C%20for%20example%2C%20and%20enters%20code%20%22x%22%2C%20then%20the%20rest%20of%20the%20row%20(columns%20G%3AAA)%20automatically%20populate%20the%20%22x%22.%20This%20isn't%20the%20case%20for%20the%20other%20letters%20-%20they%20will%20be%20input%20manually%20day-by-day%2C%20but%20when%20the%20facilitator%20enters%20%22X%22%2C%20I%20want%20the%20rest%20of%20the%20days%20in%20the%20row%20to%20be%20filled%20in%20automatically.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20is%20that%20I%20can't%20put%20the%20formula%20into%20each%20cell%20because%20each%20cell%20is%20otherwise%20being%20used%20for%20the%20other%20codes%2C%20if%20the%20student%20isn't%20%22x%22'd.%20Moreover%2C%20the%20codes%20to%20the%20left-columns%2C%20must%20remain...so%2C%20if%20the%20student%20was%20P%2CP%2CP%2CR%2CX%2C%20then%20I%20would%20want%20the%20final%20record%20to%20be%3A%3C%2FP%3E%3CP%3EP%2CP%2CP%2CR%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX%2CX.%20Thus%2C%20it's%20important%20that%20the%20formula%20NOT%20be%20in%20the%20range%2C%20that%20the%20formula%20finds%20the%20X%2C%20and%20only%20populates%20cells%20to%20the%20right%20with%20subsequent%20X's%20until%20day%2025%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20a%20good%20part%20of%20the%20problem%20is%20that%20the%20cells%20that%20we%20would%20be%20populating%20will%20be%20blank%20prior%20to%20the%20completion%20task...meaning%2C%20if%20the%20solution%20herein%20involves%20dual%20conditions%20(1-From%20Left%20to%20Right%2C%20If%20there%20is%20an%20%22X%22%20on%20a%20row%20and%202-if%20there%20is%20a%20blank%20cell%20in%20that%20same%20row%2C%20then%20insert%20%22X%22%20into%20blank%20cells%20on%20that%20same%20row)%20-%20but%2C%20that%20may%20not%20matter.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20gotten%20the%20array%20to%20produce%20False%2FTrue%20results%20in%20OTHER%20Cells%20but%2C%20not%20in%20the%20target%20cells.%20In%20the%20supplied%20file%20example%20(Xtestfile.xlsx)%2C%20if%20it%20were%20a%20snapshot%20in%20time%2C%20I%20would%20want%20rows%203%2C4%2C5%20to%20now%20automatically%20have%20%22x%22%20in%20columns%20S-AA%2C%20keeping%20columns%20A-R%20as-is%2C%20and%20leaving%20row%202%20and%206%20as-is%2C%20save%20for%20the%20possibility%20that%20they%20may%20X%20on%20a%20subsequent%20day.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20played%20with%20all%20of%20the%20following%20formulas%20to%20some%20extent%2C%20with%20no%20results...but%2C%20the%20answer%20is%20somewhere%20in%20there....maybe%3F%26nbsp%3B%3C%2FP%3E%3CP%3EIndex%2C%20Match%2C%20CountIf%2C%20Search%2C%20Lookup%2C%20Isnumber%2C%20isblank%2C%20substitute%2C%20replace%2C%20countif%2C%20OFFSET%2C%20countA%2C%20Countblank%2C%20And%2C%20or%2C%20If%2C%20XOR...and%20probably%20others!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20you%20can%20help!%20Thank%20you%2C%20in%20advance!%3C%2FP%3E%3CP%3EBill%20N%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1136101%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1136384%22%20slang%3D%22en-US%22%3ERe%3A%20Filling%20Blank%20Cells%20in%20Row%20based%20on%20other%20Cells%20in%20Range%20-%20help!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1136384%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F536347%22%20target%3D%22_blank%22%3E%40bneater%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20needed%20to%20allow%20for%20a%20blank%20(space)%20in%20your%20Data%20Validation%20choices.%20Then%20a%20simple%20IF%20formula%20fills%20the%20x's%20all%20the%20way%20across%2C%20but%20leaves%20it%20blank%20and%20allows%20the%20other%20allowed%20entries%20if%20that's%20what's%20called%20for.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20the%20way%2C%20although%20your%20%22list%22%20for%20Data%20Validation%20is%20short%20enough%20to%20fit%20in%20the%20space%20allotted%20in%20the%20dialog%20box%20entirely%2C%20are%20you%20aware%20that%20you%20could%20also%20create%20a%20list%20elsewhere%20in%20your%20workbook%2C%20let's%20say%20in%20a%20sheet%20called%20DataVal%2C%20cells%20A1%3AA8%20(or%20whatever)%2C%20and%20then%20in%20the%20field%20in%20the%20dialog%20box%20just%20enter%20the%20address%20of%20that%20list.%20You%20can%20also%20give%20the%20A1%3AA8%20range%20of%20cells%20a%20name%20(%22AttendCodes%22%20perhaps)%20and%20then%20just%20refer%20to%20the%20name%20%3DAttendCodes%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoing%20that%20gives%20you%20more%20flexibility%20in%20maintaining%20the%20list.%20Just%20be%20sure%20that%20one%20of%20them%20contains%20a%20space.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Lawd - this one has consumed way too much of my time, and somewhere in my brain, I'm convinced this isn't as difficult as I'm making it. However, I feel like I've tried every combination, and pieces of the final answer have appeared, but alas, never together. 

Here's the setup and issue:

I have an attendance sheet that will be filled in by facilitators for a 25-day class. Columns A/B are Last/First, and C:AA are the actual days of the class. Cells in C:AA are data validated to only be the codes we recognize (P, A, T, F, R, Pf, X). The Columns are fixed, but the rows aren't - they will flex based on class size. 

 

All I want to happen is if a facilitator gets to day 4 (column F), for example, and enters code "x", then the rest of the row (columns G:AA) automatically populate the "x". This isn't the case for the other letters - they will be input manually day-by-day, but when the facilitator enters "X", I want the rest of the days in the row to be filled in automatically. 

 

The problem is that I can't put the formula into each cell because each cell is otherwise being used for the other codes, if the student isn't "x"'d. Moreover, the codes to the left-columns, must remain...so, if the student was P,P,P,R,X, then I would want the final record to be:

P,P,P,R,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X. Thus, it's important that the formula NOT be in the range, that the formula finds the X, and only populates cells to the right with subsequent X's until day 25 

I think a good part of the problem is that the cells that we would be populating will be blank prior to the completion task...meaning, if the solution herein involves dual conditions (1-From Left to Right, If there is an "X" on a row and 2-if there is a blank cell in that same row, then insert "X" into blank cells on that same row) - but, that may not matter. 

 

I've gotten the array to produce False/True results in OTHER Cells but, not in the target cells. In the supplied file example (Xtestfile.xlsx), if it were a snapshot in time, I would want rows 3,4,5 to now automatically have "x" in columns S-AA, keeping columns A-R as-is, and leaving row 2 and 6 as-is, save for the possibility that they may X on a subsequent day. 

 

I've played with all of the following formulas to some extent, with no results...but, the answer is somewhere in there....maybe? 

Index, Match, CountIf, Search, Lookup, Isnumber, isblank, substitute, replace, countif, OFFSET, countA, Countblank, And, or, If, XOR...and probably others! 

 

I hope you can help! Thank you, in advance!

Bill N

1 Reply
Highlighted

@bneater 

 

You needed to allow for a blank (space) in your Data Validation choices. Then a simple IF formula fills the x's all the way across, but leaves it blank and allows the other allowed entries if that's what's called for.

 

By the way, although your "list" for Data Validation is short enough to fit in the space allotted in the dialog box entirely, are you aware that you could also create a list elsewhere in your workbook, let's say in a sheet called DataVal, cells A1:A8 (or whatever), and then in the field in the dialog box just enter the address of that list. You can also give the A1:A8 range of cells a name ("AttendCodes" perhaps) and then just refer to the name =AttendCodes

 

Doing that gives you more flexibility in maintaining the list. Just be sure that one of them contains a space.