Not sure whether to use VLOOKUP or an IF statement

A

Allison1962

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
 
G

Glenn

Allison1962 said:
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.
 
J

John

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top