# Assigning scores based on how long ago something happened, stuck on formula

#### blackrose91

##### New Member
I’m trying to use a bunch of if / and statements to work on the following problem but it isn’t really getting me anywhere.
The premise of what I’m working on is that certain things have taken place in the past, and depending on how long ago it happened, it gets a certain score.

- If it happened in 2018 it gets a score of 10.
- If it happened 1-3 years ago it gets a score of 20.
- If it happened 4-7 years ago it gets a score of 30.
- If it happened 8 or more years ago it gets a score of 40.

So I have in column “A” a list of the different types of events that have taken place. In column B the date they took place, and in column C, I’m trying to put in the scores.

If just can’t seem to make a formula that does what I’m after and the inclusion of working out how long ago something happened is really confusing me.

Any help would be hugely appreciated !

### Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

#### Fluff

##### MrExcel MVP, Moderator
Cross posted https://www.excelforum.com/excel-fo...-ago-something-happened-stuck-on-formula.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

#### Eric W

##### MrExcel MVP
Maybe something like this?

ABCD
1EventDateScore
212/20/201910
327/1/201810
431/1/201820
541/1/201530
654/5/201040
768/1/200040

<tbody>
</tbody>
Sheet5

Worksheet Formulas
CellFormula
C2=LOOKUP(DATEDIF(B2,TODAY(),"y"),{0,1,4,8},{10,20,30,40})

<tbody>
</tbody>

<tbody>
</tbody>

Replies
3
Views
68
Replies
5
Views
50
Replies
1
Views
124
Replies
3
Views
36
Replies
8
Views
595

Threads
1,108,501
Messages
5,523,290
Members
409,508
Latest member
Afc