Hello!

The function I have written into excel is:

=IF(F22=0.04, LOOKUP(F21, 'R123 isobaric'!A8:A198, 'R123 isobaric'!F8:F198),

IF(F22=0.05, LOOKUP(F21, 'R123 isobaric'!A209:A399, 'R123 isobaric'!F209:F399),

IF(F22=0.06, LOOKUP(F21, 'R123 isobaric'!A410:A604, 'R123 isobaric'!F410:F604),

IF(F22=0.07, LOOKUP(F21, 'R123 isobaric'!A614:A808, 'R123 isobaric'!F614:F808)))))

This currently works as it is written in a cell, I would like to have this in a macro instead; how do I write this so that it will work?

Thanks! (I am new to this whole macro/VBA stuff....)