• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Find and change consecutive, repeating, specific text in a row.

tdw

New Member
Hi Everyone, Sorry for such a basic question... Have a simple attendance worksheet where entries can be P, Ab, s, or blank. Want to add a formula so that if person has 5 consecutive absences - identified by value of Ab in the cell - change the Ab value in just those 5 cells SW. It is possible that there would be a blank cell in the middle, which should be ignored. I've looked for array formulas but nothing looked promising. Not new to Excel but as you see, use the basics. Thanks so much!! Terry (ps Would be glad to take a class but not sure which class would over this...?)
 

Attachments

  • sample attendance.xlsx
    10.2 KB · Views: 0
Hi Terry ,

What you want done cannot be achieved using formulae ; if my reading of your requirement is correct , you want that the absent values in the ranges G2:L2 , and in H4:L4 should be replaced by SW ; is this correct ?

Since these ranges already have data in them , where will you enter any formula which needs to change them ?

What you want done can be achieved using VBA ; is this acceptable ?

Narayan
 
Hi Narayan,
Thanks!! Think we are saying the same thing - I'm uploading an updated file that shows the changes I am trying to get as highlighted. Can't say I was sure where the formula would be unless it was in a hidden cell that the instructors couldn't see. VBA would be fine... THANKS!! Terry
 

Attachments

  • Revised sample attendance.xlsx
    10.6 KB · Views: 0
Hi Narayan,

Sorry - did I either not provide what you needed or confuse the issue - or maybe just missed your answer? Thanks! Terry
 
Hi:

Please find the attached, I have coded to meet your needs. I have tested only for the data set you have provided. You may want to test it for a bigger data set with different scenarios. Let me know with questions if any.

Thanks
 

Attachments

  • Revised sample attendance.xlsm
    19.1 KB · Views: 2
Hi Nebu, This is AWESOME!!! Thank you!! Since it says you are an 'Active Member' rather than an 'Excel Ninja', am I able to thank you with a donation using the DONATE button? If not, is there some other way? I'm truly appreciative for this help! Terry
 
Hi:

Thanks for the feedback, no you cannot donate anything to me through this forum and I am not looking for any :), I am doing this out of my interest in excel and I work during my free time. I am attaching a copy of the same macro with an error handler , this code is not different from the one I already provided, I just added one more line to the code.

Thanks
 

Attachments

  • Revised sample attendance.xlsm
    19.7 KB · Views: 1
Back
Top