D
D
deleted-leshadro2014-07-14 15:25:59
Windows
deleted-leshadro, 2014-07-14 15:25:59

How to write an excel formula with substitution?

Good afternoon.
I've been struggling with the following question for a long time.
There is an excel book and a couple of spreadsheets. One table is the difference between two dates. The second table with substitution of values ​​(1-2 years, 3-4 years, etc.)
Question: how to organize the IF formula in order to display a period of time from the substitution table in a line.
If the difference between the dates is 1 year and 10 months, then enter the value 1-2 years into the cell.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Lobanov, 2014-07-14
@deleted-leshadro

How well do you know Excel?
In general, nothing complicated. Count the difference between the dates, divide by the reference difference (meaning the unit of the period, in your case 2 years). Next, round the resulting number to a lower integer, that is, 1 year and 10 months. will return 0, 2 years and 3 months will return 1. In the substitution table, write the correspondence:

0     1-2 года
1     3-4 года
2     5-6 лет

Using the string search function (VLOOKUP () it seems) you get the value of the substitution, and substitute it.
If the periods are not necessarily multiples of 2 years, such as 1-2, 3-4, 5-10, then the algorithm will be different, of course. But it's not clear from your question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question