Find equal date or next less

guggu

New member
Local time
Tomorrow, 04:17
Joined
Jan 19, 2010
Messages
9
Hi Guys,
I have a spread sheet that I use to manage some projects (Programme)
What I have is the project name's in B5, B6.....B117
In C5 I have a start Date of the project
D5 Calculates the if it is over or under time.
I only enter dates in the (red Accent 2 80%) what i call a pinkish colour.
Now it seems to work if the dates flow from one cell to the next.

What I need is to work out a way to allow any part of the project to be completed (Could be at the end or middle) and it not give error and work correctly.
I need it to basically look for dates entered and grab the date that is equal to the date entered in that row series or the next date down.
Can this be done?
Thanks in advance if you can help.

For example I will enter a start date in c5
Then I put a date in F5, as E5 and G5 are calculating based on them.
This part works. If I then enter a date in I5 this will still work as it is always looking at the previous cell refrence.
I need it to also work even if I didn't put a date in I5 but had to put a date in AA5,
so entering in the date is not sequential but can be spazmotic but all along the same row and be able to replicate the formula (or VBA) in the rows below.
 

Attachments

I haven't got 2007 and not sure that I understand but I think that you want to find the first nonempty cell in particular columns.
you will need to use VBA.TThe code below is just an idea that you might work on this just looks bak every other colmn, it could start a different number of columns back than the loop index as I'm sure yours will, plus yours will presumable pass a parameter to the function.

Function bjwfunc() As Date

Dim colm As Long
colm = 2
Do While IsEmpty(ActiveCell.Offset(0, -colm).Value)
colm = colm + 2
Loop

bjwfunc = ActiveCell.Offset(0, -colm).Value

End Function

If empty cells gain values later you will need to recalculate.

Brian
 

Users who are viewing this thread

Back
Top Bottom