Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Not sure whether to use VLOOKUP or an IF statement
I am trying to figure out how to write either a vlookup or an if statement
for the following: I have 3 columns - 1 is originating date, 2 is priority, 3 is a calulated date field based on the combination of 1 and 2. ie in column 1, originating date is November 23, 2008, column 2 shows "low", column 3 needs to show column 1 + 5 days. Note that column 2 has 3 choices high, medium and low. High being column 1 + 1 day for high, 1 + 2 days for medium and 1 + 5 days for low. I wrote the vlookup table to show that if column 2 shows 1(high), then take column 1 and add 1 day,etc. The problem I am having is when I wrote my vookup, it is only picking up the date that is in G2. How would I write my vookup to show that as I copy this down to each new row, it picks up the new amount in column G and not just what is in G2. Priority Type Due Date Critical - 24 Hrs =SUM('OI Table'!G2)+1 High - 2 Days =SUM('OI Table'!G2) + 2 Low - 5 Days =SUM('OI Table'!G2) + 5 -- Thanks Allison |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Not sure whether to use VLOOKUP or an IF statement
Allison1962 wrote:
I am trying to figure out how to write either a vlookup or an if statement for the following: I have 3 columns - 1 is originating date, 2 is priority, 3 is a calulated date field based on the combination of 1 and 2. ie in column 1, originating date is November 23, 2008, column 2 shows "low", column 3 needs to show column 1 + 5 days. Note that column 2 has 3 choices high, medium and low. High being column 1 + 1 day for high, 1 + 2 days for medium and 1 + 5 days for low. I wrote the vlookup table to show that if column 2 shows 1(high), then take column 1 and add 1 day,etc. The problem I am having is when I wrote my vookup, it is only picking up the date that is in G2. How would I write my vookup to show that as I copy this down to each new row, it picks up the new amount in column G and not just what is in G2. Priority Type Due Date Critical - 24 Hrs =SUM('OI Table'!G2)+1 High - 2 Days =SUM('OI Table'!G2) + 2 Low - 5 Days =SUM('OI Table'!G2) + 5 One way, with your date in A1 and "Low", "Middle" or "High" in B1: =A1+CHOOSE(SEARCH(LEFT(B1,1),"lmh"),5,2,1) Make sure to format the result as a date. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Not sure whether to use VLOOKUP or an IF statement
Hi Allison
This will work : =IF(B49="Low",A49+5,IF(B49="medium",A49+2,IF(B49=" High",A49+1,""))) Adjust range to your needs HTH John "Allison1962" wrote in message ... I am trying to figure out how to write either a vlookup or an if statement for the following: I have 3 columns - 1 is originating date, 2 is priority, 3 is a calulated date field based on the combination of 1 and 2. ie in column 1, originating date is November 23, 2008, column 2 shows "low", column 3 needs to show column 1 + 5 days. Note that column 2 has 3 choices high, medium and low. High being column 1 + 1 day for high, 1 + 2 days for medium and 1 + 5 days for low. I wrote the vlookup table to show that if column 2 shows 1(high), then take column 1 and add 1 day,etc. The problem I am having is when I wrote my vookup, it is only picking up the date that is in G2. How would I write my vookup to show that as I copy this down to each new row, it picks up the new amount in column G and not just what is in G2. Priority Type Due Date Critical - 24 Hrs =SUM('OI Table'!G2)+1 High - 2 Days =SUM('OI Table'!G2) + 2 Low - 5 Days =SUM('OI Table'!G2) + 5 -- Thanks Allison |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
if then statement (i think) or vlookup | Excel Worksheet Functions | |||
Vlookup or If Statement? | Excel Discussion (Misc queries) | |||
If Statement / VLookup | Excel Worksheet Functions | |||
VLOOKUP with IF statement | Excel Discussion (Misc queries) | |||
Vlookup or If statement Help | Excel Worksheet Functions |