Hi
I have a large piece of data which I "was" minipulating in Excel, using complex formulas and some vba, but as I know will be looking at various reports, I have imported them to Acess as tables... And was trying to query the table na dpull the number of days.
Unfortunately I am struggling trying to use an equivilant "long" formula that I would have used in Excel... see below
Code:
=IF(AH33=0.5,0.5,IF(AND(AC33>=$J$1,AC33<=$K$1,AB33<=$K$1),NETWORKDAYS(AC33,AB33),IF(AND(AC33>=$J$1,AC33<=$K$1,AB33>$K$1),NETWORKDAYS(AC33,$K$1),IF(AND(AC33>=$J$1,AB33>=$J$1,AB33<=$K$1),NETWORKDAYS($J$1,AB33),IF(AND(AC33<$J$1,AB33>$K$1),NETWORKDAYS($J$1,$K$1),IF(AND(AC33<$J$1,AB33>$J$1,AB33<$K$1),NETWORKDAYS($J$1,AB33,0)))))))
It basically counts network days that fall within a period (4 weeks), looking at the courses start and end dates. So in some cases, a course may be 5 days long, with 3 days falling in one period and 2 days in the next...
I'm guessing I can use a "Case" statement in a module, but struggle seeing how or where to add field names etc.....
Any pointers at all would be helpful...
Thanks