ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   VLOOKUP & Dates: Why is this Formula working? (https://www.excelbanter.com/excel-worksheet-functions/65880-vlookup-dates-why-formula-working.html)

Ali

VLOOKUP & Dates: Why is this Formula working?
 
Okay: 2 sheets
sheet1: called Nationality
Sheet2: called Graph

Sheet 1 consists of a table. Column A4:20 is various nationalities.
Columns B3-M3 are months of the year, with column B starting with JULY
Under Month are various percentages corresponding to nationalities for that
Month.
Cell I1: named MONTH. format of cell is general. Cell K1 is a date. Any
date can be entered, such as Dec 05.
at the bottom of this page is a graph reflecting nationailities, and the
graph
changes DEPENDING on the date entered in K1. Example: enter Dec 05 and the
nationality stats for the month of Dec show on the graph. Enter June 05 and
graph shows nationality stats for June.

Sheet 2 (called Graph) has a table
A4: A20 are nationalities
B3: cell is named PERIOD and C3: cell is named YTD for the graph
Formula in B4 is
=VLOOKUP(1,Nationality!B4:M4, IF(MONTH(date)6,MONTH(date)-6,MONTH(date)+6))
under column YTD formula is simply
= nationality!O4
I could just copy and use this existing Graph and worksheets. My problem is
that my year commences in JUNE and not July and if I merely change Column B3
(on nationalities worksheet)to June it no longer registers correctly.
Does this explain in enough detail. i am desperate to use this worksheet
and graph, but cannot understand how it is reading the date and how to get it
to commence in June. i have checked everywhere to see if there is a formula
I am missing that would explain something else.



intruder9

VLOOKUP & Dates: Why is this Formula working?
 

Please send me a copy of your sheet to
and I will see what is happening for you.


--
intruder9
------------------------------------------------------------------------
intruder9's Profile:
http://www.excelforum.com/member.php...o&userid=30107
View this thread: http://www.excelforum.com/showthread...hreadid=502425



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

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