Check availability

sb003848

Board Regular
Joined
Sep 17, 2009
Messages
66
Hello to all,

I have a hard one for you guys... I already have a macro used to verify the proper filling of a document and I would like to add a code at the end where the following would be done... Here goes:

In Cells "E9" to "E21", I'm asking people to select some articles (the value of the cells can either be 0 or 1).

Then, depending on the article asked, dates must be entered in:

cells "C33" and "C352" (only needed if the value of cell "E12" is 1)

cell "D45" (only needed if the value of cell "E14" is 1)

cells "D53" and "D56" (only needed if the SUM of cells "E9","E10","E11","E13","E14","E15","E16","E17","E18","E19","E20","E21" is 1 or higher).

Cell "C33": Date event starts
Cell "C35": Date event ends
Cell "D45": Date of event (no end date)
Cell "C53": Date event starts
Cell "C56": Date event ends

Here is the tricky part.

In another sheet (named "Calendrier"), I have the dates going from January 1st 2011 in cell "A2" to December 31st 2012 in cell "A732".

If "E9" = 1, then using the start date ("D53") and end date ("D56"), verify in sheet "Calendrier" if the item (located in column "B") is availble for the dates. If the cells between the 2 dates are all empty, then the item is available (in this case, the cells in question should be marked with an X). If the cells between the 2 dates are not all empty, then an error message should be shown saying the item is not available for the required dates.

If "E12" = 1, then using the start date ("C33") and end date ("C35"), verify in sheet "Calendrier" if the item (located in column "E") is availble for the dates. If the cells between the 2 dates are all empty, then the item is available (in this case, the cells in question should be marked with an X). If the cells between the 2 dates are not all empty, then an error message should be shown saying the item is not available for the required dates.

If "E14" = 1, then using the event date ("D45"), verify in sheet "Calendrier" if the item (located in column "G") is availble for the date. If the cell of the date is empty, then the item is available (in this case, the cell in question should be marked with an X). If the cell of the date is not empty, then an error message should be shown saying the item is not available for the required date.

Hope I explained this correctly. If you have any questions, please "Private Message" me...
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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