David_Skov
Active Member
- Joined
- Jun 29, 2004
- Messages
- 267
I have my database (ofcourse) and then I made a query which I have choosen to be sorted by year and then by week. I do a small calculation but in that calculation I need to get the info of the weeknumber in the final/last row of the database-query.
So if I have a structure that looks like this:
Year - week - cost
2003 - 2 - 5000
2003 - 3 - 7000
... - ... - ...
2004 - 20 - 5543
2004 - 20 - 8325
2004 - 21 - 2000
The "-" indicates a new cell. I need a formula or a way to be able to know what the week in the last row is (in the example above its 21). But since I would like it to run automatically I would really like to avoid doing any manual work
I have an ID in the first coloum btw. Just ascending numbers from 1,2,3...etc.
So if I have a structure that looks like this:
Year - week - cost
2003 - 2 - 5000
2003 - 3 - 7000
... - ... - ...
2004 - 20 - 5543
2004 - 20 - 8325
2004 - 21 - 2000
The "-" indicates a new cell. I need a formula or a way to be able to know what the week in the last row is (in the example above its 21). But since I would like it to run automatically I would really like to avoid doing any manual work

I have an ID in the first coloum btw. Just ascending numbers from 1,2,3...etc.