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 |
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. |
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 |
All times are GMT +1. The time now is 06:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com