2 part lookup question

C

CP

I have a two part question to solve and I hope what is written makes sense

1) in the F column - F1 =12 unless A1 starts with either GM or STW
this is to fix a calculation later i would then fill down to cover the F
column

2) the following is in G column but I need to add "ignore calculation if D1
is blank" then i would fill down to cover the rest of D
=IF(ISNA(VLOOKUP(B20,Sheet2!A:F,4,0)),"",VLOOKUP(B20,Sheet2!A:F,4,0))

Many thanks
 
B

Bob Phillips

Not really sure, but maybe


F1: =IF(OR(LEFT(A1,2)="GM",LEFT(A1,3)="STW"),"",12)

G1: =
IF(D1="","",IF(ISNA(VLOOKUP(B1,Sheet2!A:F,4,0)),"",VLOOKUP(B1,Sheet2!A:F,4,0)))
 
C

CP

forgot a small part in first question - if A1 does start with GM or STW then
F1 = 6 otherwise it = 12

apologies for that
 
C

CP

Did not work!! I just get 12 all the time.

Cell A1 is a reference number like GM234B, STW21V or L45
What comes after the initial letters can vary not sure if this affects the
results
 
C

CP

Apologies ignore my last statement - I made a basic error, it works fine many
thanks for the help
 

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