作者:DiKi造型Alen老师 | 来源:互联网 | 2023-07-10 09:07
ImtryingtosolvearatherbasicquestioninaexcelsheetusingvbabutIcantfindtheanswer..
I'm trying to solve a rather basic question in a excel sheet using vba but I can't find the answer...
我正在尝试使用vba在excel表中解决一个相当基本的问题,但我找不到答案......
I am working on a timetable which is dynamically populated from an other excel sheet with boolean values True or False. The named range is called "A" in excel and contains boolean values True or False. Every column represents a possible start hour. Every row represents a different collage with a starting hour and an end hour. Each row can have NO values (entire row = False = collage is on leave) OR the row can have two values TRUE on different cells in the same row representing start hour and end hour. What I would like to achieve is a to find ROW by ROW for a couple of boolean TRUE. If found the cells between the first and second True should be colored in let's say yelow.
我正在制作一个时间表,该时间表是从其他excel表中动态填充的,其布尔值为True或False。命名范围在excel中称为“A”,包含布尔值True或False。每列代表一个可能的开始时间。每行代表一个不同的拼贴画,包括开始时间和结束时间。每行可以具有NO值(整行= False =拼贴处于休假状态)或者该行可以在表示开始时间和结束时间的同一行中的不同单元格上具有两个值TRUE。我想要实现的是通过ROW找到ROW的几个布尔值TRUE。如果发现第一个和第二个真实之间的单元格应该被标记为黄色。
I am able to loop in a named range finding a specific value but I'm unable to find a pair of TRUE values in a specific row. As a double check I want to be sure that the first an second TRUE MUST be on the same row. So it is impossible to color between 2 cells in a different row.
我能够在命名范围内循环查找特定值,但我无法在特定行中找到一对TRUE值。作为一个双重检查,我想确保第一个第二个TRUE必须在同一行。因此,不可能在不同行中的2个单元格之间进行着色。
See picture :
见图:
Some advice or thought would be greatly appreciated!
一些建议或想法将不胜感激!
1 个解决方案