Try
=(D99=1960)*(D7=Sheet2!G7)+(D99=311)*(D7=Sheet2!D7 )+(D99=305)*(D7=Sheet2!J7)
I'll let you fix the worksheet name!
Note: you will get 0 if D99 is none of required values and/or if D7 fits
none or the required values
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
wrote in message
ups.com...
hi,
i need some help with a complex excel function that may need to be a
macro but i am not the most proficent at them. what i need is below if
anyone can offer help
i need to check the data in D99 and then run a specific formula
depending on the data in D99
if d99 = 1960 then the forumula needs to be =IF(D7='Proficy CL Limits,
Ranges'!G7,1,0)
if d99 = 311 then the formula needs to be =IF(D7='Proficy CL Limits,
Ranges'!D7,1,0)
if d99 = 305 then the formula needs to be =IF(D7='Proficy CL Limits,
Ranges'!J7,1,0)
the formula must then run in d100 to d184
Any help would be greatly appreciated