Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default VLOOKUP and IF Functions

Hi all

I have a small problem which I seem unable to correct. I have a spreadsheet
which contain several columns of which two are dates. To simplify I have re
created a smaller table below. The last test date is the important date as
the week numbers are against this column

Col 1 Col 2 Col 3 Initial Test Last Test
Next Test Week Number
aaa aaa aaa 01 Dec 06 20 Jan 07
01 Mar 07
bbb bbb bbb 09 Dec 06 12 Jan 07
15 Feb 07
ccc ccc ccc 11 Nov 06 03 Jan 07
10 Mar 07

I need to calculate the week number that the next test is due on. It is
quite simple for weeks in the current financial year (last week of March 07)
as I use the formulae WEEKNUM(Next Test,2)-39, but of course when it gets
into the new financial year, the first week of April 07 the week number is
incorrect. I considered using VLOOKUP using the wee ending dates and week
numbers from a new worksheet, but unfortunately I seem to be stuck with this
function as I believe is needs to use the IF function and or the AND
function alongside it.

The VLOOKUP worksheet would look something like this:

Week End Date Week Number
03 Jan 07 42 / 07
10 Jan 07 43 / 07
17 Jan 07 44 / 07

and so on

I believe there must be an easier way. Can anyone please help before I tear
the remaining solitary hair out.

Many thanks in advance

Peter W S (UK)


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default VLOOKUP and IF Functions

Peter,

Something along the lines of

=WEEKNUM(NextTest,2)-IF(NextTestDATEVALUE("31/3/2007"),X,Y)

The X and Y should be replaced by appropriate constants ....you'll have to
figure out your specific week number math values to use... and I may have
gotten the date string mixed up, since the US uses different strings than
the UK....

HTH,
Bernie
MS Excel MVP




"Peter W Soady (UK)" wrote in message
...
Hi all

I have a small problem which I seem unable to correct. I have a
spreadsheet which contain several columns of which two are dates. To
simplify I have re created a smaller table below. The last test date is
the important date as the week numbers are against this column

Col 1 Col 2 Col 3 Initial Test Last Test
Next Test Week Number
aaa aaa aaa 01 Dec 06 20 Jan 07 01
Mar 07
bbb bbb bbb 09 Dec 06 12 Jan 07 15
Feb 07
ccc ccc ccc 11 Nov 06 03 Jan 07 10
Mar 07

I need to calculate the week number that the next test is due on. It is
quite simple for weeks in the current financial year (last week of March
07) as I use the formulae WEEKNUM(Next Test,2)-39, but of course when it
gets into the new financial year, the first week of April 07 the week
number is incorrect. I considered using VLOOKUP using the wee ending dates
and week numbers from a new worksheet, but unfortunately I seem to be
stuck with this function as I believe is needs to use the IF function and
or the AND function alongside it.

The VLOOKUP worksheet would look something like this:

Week End Date Week Number
03 Jan 07 42 / 07
10 Jan 07 43 / 07
17 Jan 07 44 / 07

and so on

I believe there must be an easier way. Can anyone please help before I
tear the remaining solitary hair out.

Many thanks in advance

Peter W S (UK)



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default VLOOKUP and IF Functions

Bernie

Many thanks for the time. I will try this today.

You have the date format correct

Peter
----------------------
Peter Something along the lines of

=WEEKNUM(NextTest,2)-IF(NextTestDATEVALUE("31/3/2007"),X,Y)

The X and Y should be replaced by appropriate constants ....you'll have to
figure out your specific week number math values to use... and I may have
gotten the date string mixed up, since the US uses different strings than
the UK....

HTH,
Bernie
MS Excel MVP




"Peter W Soady (UK)" wrote in message
...
Hi all

I have a small problem which I seem unable to correct. I have a
spreadsheet which contain several columns of which two are dates. To
simplify I have re created a smaller table below. The last test date is
the important date as the week numbers are against this column

Col 1 Col 2 Col 3 Initial Test Last Test
Next Test Week Number
aaa aaa aaa 01 Dec 06 20 Jan 07
01 Mar 07
bbb bbb bbb 09 Dec 06 12 Jan 07 15
Feb 07
ccc ccc ccc 11 Nov 06 03 Jan 07
10 Mar 07

I need to calculate the week number that the next test is due on. It is
quite simple for weeks in the current financial year (last week of March
07) as I use the formulae WEEKNUM(Next Test,2)-39, but of course when it
gets into the new financial year, the first week of April 07 the week
number is incorrect. I considered using VLOOKUP using the wee ending
dates and week numbers from a new worksheet, but unfortunately I seem to
be stuck with this function as I believe is needs to use the IF function
and or the AND function alongside it.

The VLOOKUP worksheet would look something like this:

Week End Date Week Number
03 Jan 07 42 / 07
10 Jan 07 43 / 07
17 Jan 07 44 / 07

and so on

I believe there must be an easier way. Can anyone please help before I
tear the remaining solitary hair out.

Many thanks in advance

Peter W S (UK)





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VLOOKUP, IF and RIGHT functions together Alicia Excel Worksheet Functions 3 September 29th 06 04:31 PM
Combining VLOOKUP functions Jay Excel Worksheet Functions 16 August 31st 06 06:52 PM
if statements depending on multiple VLOOKUP functions njuneardave Excel Discussion (Misc queries) 1 June 21st 06 04:33 PM
Embedding functions in Vlookup? AsstInterests Excel Worksheet Functions 2 May 25th 06 08:54 PM
Possible to combine VLOOKUP and IF(AND) functions? Ihoris Excel Worksheet Functions 1 April 6th 06 09:54 AM


All times are GMT +1. The time now is 11:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"