ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula Help (https://www.excelbanter.com/excel-discussion-misc-queries/233568-formula-help.html)

-Julie

Formula Help
 
I need help creating a formula, please. If column a contains today() and
column b contains dates and column c contains a number, I want the formula to
look at today's date and find the date closest but not higher than today and
return the corresponding number. In this case, I want an answer of "2"
returned.
A B C
1 06/11/2009 05/15/2009 1
2 05/31/2009 2
3 06/15/2009 3


Max

Formula Help
 
Presuming the data in cols B and C are sorted in ascending order by col B,
think you could try: =VLOOKUP(A1,B:C,2)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"-Julie" wrote:
I need help creating a formula, please. If column a contains today() and
column b contains dates and column c contains a number, I want the formula to
look at today's date and find the date closest but not higher than today and
return the corresponding number. In this case, I want an answer of "2"
returned.
A B C
1 06/11/2009 05/15/2009 1
2 05/31/2009 2
3 06/15/2009 3


-Julie

Formula Help
 
Thanks, that works! But can you translate that for me? Tell me what the
formula is looking at once it gets to column B. This will help me in the
future.

"Max" wrote:

Presuming the data in cols B and C are sorted in ascending order by col B,
think you could try: =VLOOKUP(A1,B:C,2)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"-Julie" wrote:
I need help creating a formula, please. If column a contains today() and
column b contains dates and column c contains a number, I want the formula to
look at today's date and find the date closest but not higher than today and
return the corresponding number. In this case, I want an answer of "2"
returned.
A B C
1 06/11/2009 05/15/2009 1
2 05/31/2009 2
3 06/15/2009 3


Max

Formula Help
 
That's good. Could you spare a moment to click the YES button in that response?

The expression, with the range lookup param omitted, sets it for an approx
match to be found in col B for the lookup date in A1. This requires that the
table array be sorted in ascending order by its 1st col, ie by col B. Pl
check Excel's HELP on VLOOKUP for more details.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"-Julie" wrote:
Thanks, that works! But can you translate that for me? Tell me what the
formula is looking at once it gets to column B. This will help me in the
future.




All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com