getting a formula to do a similar job as another

LearningEX

Board Regular
Joined
Mar 13, 2015
Messages
208
i would like the following formula (1) and (2) to work in the same way as formula (3)

formula (3)

Code:
=VLOOKUP(Agency_Daily_Input!D9,Agency_Contract!$C$9:$T$10000,IF(AND(WEEKDAY(Agency_Daily_Input!B9)>1,WEEKDAY(Agency_Daily_Input!B9)<7),13,IF(WEEKDAY(Agency_Daily_Input!B9)=7,15,IF(WEEKDAY(Agency_Daily_Input!B9)=1,17)+IF(Agency_Daily_Input!G9>0.708333333333333,1))),FALSE)

the above one return a value based on cell c9 on Agency Daily Input

id like formula (2) to do the same

Code:
=IF(Agency_Contract!X9:X100000=0,0,IF(J9>Agency_Contract!X9:X100000,J9-Agency_Contract!X9:X100000,0))

formula (3)

Code:
=T9*Agency_Contract!$Y$9:$Y$100000*I9
 
Then simply add them, where it says U2 paste the vlookup (as below), I wouldn't! As I said why do the same lookup multiple times?

=IF(VLOOKUP(D9,Agency_Contract!$C$9:$Y$10,21,FALSE)=0,"",IF(J9>VLOOKUP(D9,Agency_Contract!$C$9:$Y$10,21,FALSE),J9-VLOOKUP(D9,Agency_Contract!$C$9:$Y$10,21,FALSE),VLOOKUP(D9,Agency_Contract!$C$9:$Y$10,21,FALSE)))
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Then simply add them, where it says U2 paste the vlookup (as below), I wouldn't! As I said why do the same lookup multiple times?

=IF(VLOOKUP(D9,Agency_Contract!$C$9:$Y$10,21,FALSE)=0,"",IF(J9>VLOOKUP(D9,Agency_Contract!$C$9:$Y$10,21,FALSE),J9-VLOOKUP(D9,Agency_Contract!$C$9:$Y$10,21,FALSE),VLOOKUP(D9,Agency_Contract!$C$9:$Y$10,21,FALSE)))
have you downloaded the workbook?

its not looking up the company in col D (Daily Input) and returning the value in col X (Agency contract) for that company
 
Last edited:
Upvote 0
What do you mean? It returns Blank, 1.75, Blank on the 3 examples, is that wrong? If so what should it be?
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,400
Members
449,448
Latest member
Andrew Slatter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top