kod2th3e

Board Regular
Joined
Apr 2, 2008
Messages
87
I am trying to place an "x" in each cell for the corresponding hour based on the length of run. Then when a run is complete, I would like an "x" for the next scheduled item to show in the next available hour on the preceding row and so on up to 24 hours. How to I offset the next row to start at the following hour? Below is what I'm trying to accomplish but I'd like to use a formula to place the "x" in the cell rather than having to manually place them. Any/all help is greatly appreciated, thank you for looking.


PriorityDie #Length of run123456789101112131415161718192021222324
11108xxxxxxxx
21152xx
312514xxxxxxxxxxxxxx
40956

<tbody>
</tbody>


In this example die #095 wouldn't have any "X's" in any cell because all of the hours have been spoken for. Hopefully this helps to clarify the intent, thanks again for any help.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi,

In cell D2, you could test following

Code:
=IF(COUNTIF(D$1:D1,"x")>=1,"",IF(COLUMN()-3<=SUM($C$2:$C2),"x",""))

HTH
 
Upvote 0
James006,

Thanks for your response. When I put the formula in, it doesn't appear to count all 8 hours of the run length. It only places an "x" in the first 3 columns. The other rows seem to work fine though, any idea what I did wrong?
 
Upvote 0
James,

Nevermind my question below, I added a couple of columns and realized that I needed to change the -3 to -8 because I had added an additional 5 columns between the beginning of the sheet and where the formula is. This worked perfectly, thank you for your help.


James006,

Thanks for your response. When I put the formula in, it doesn't appear to count all 8 hours of the run length. It only places an "x" in the first 3 columns. The other rows seem to work fine though, any idea what I did wrong?
 
Upvote 0
James,

Nevermind my question below, I added a couple of columns and realized that I needed to change the -3 to -8 because I had added an additional 5 columns between the beginning of the sheet and where the formula is. This worked perfectly, thank you for your help.

Glad you could solve your problem ...

You are welcome
 
Upvote 0
James,

One last question.. How could I offset the next row by an additional hour? So in the example above it shows die #115 starting in hour 9, how could I get it to start in hour 10 instead?
 
Upvote 0
Hello,

Is it a generic rule change ... or do you need the flexibility to offset project by project ( i.e. for each row : Y or N ) ?
 
Upvote 0
Hello,

Is it a generic rule change ... or do you need the flexibility to offset project by project ( i.e. for each row : Y or N ) ?

I believe it'd be a generic rule change, I'd like every preceding row to start one hour after the previous. In my previous post I indicated that die #115 should start in hour 10, I'd like die #125 to start with a 1 hour gap from the previous die (#115 ) which would make it start at hour 13. Would that be a generic rule change? If so, that's what I'm trying to accomplish.
 
Upvote 0
Hello,

For you new rule ...

You can test in cell D2 the following formula:

Code:
=IF(OR(COUNTIF(D$1:D1,"x")>=1,COUNTIF(C$1:C1,"x")>=1),"",IF(COLUMN()-(ROW()+1)<=SUM($C$2:$C2),"x",""))

Hope this will help
 
Upvote 0
Hello,

For you new rule ...

You can test in cell D2 the following formula:

Code:
=IF(OR(COUNTIF(D$1:D1,"x")>=1,COUNTIF(C$1:C1,"x")>=1),"",IF(COLUMN()-(ROW()+1)<=SUM($C$2:$C2),"x",""))

Hope this will help


James,

Worked good. I have a lot more rows of data than what was originally displayed so after the last die on the list that is scheduled all of the preceding dies would place an x in every other row/column. I was able to fix this by adding an "IF" statement to your formula that looks at the "length of run" column and if it's less than 1 it will make the cell blank ("") otherwise if it's greater than 1 it'll evaluate the formula you provided. You were such a great help, thank you for your time and support.

Cheers,
-Cody
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,739
Members
449,050
Latest member
excelknuckles

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