Calculate distance ran using time vs program

1. Calculate distance ran using time vs program

I have set up a spreadsheet for myself to track how far I am running on my treadmill.

The treadmill has 12 programs and for each I have calculated the average kmph that each program does.

What I would like to do is have an IF formula in place so that all I have to do is put in the time on the treadmill (for ease lets assume at the moment it is 60 minutes) and the programme number and then the formula calculate exactly how far I have ran.

So programme 1 was 6kmph, 2 8kmph and 3 7kmph all I would have to do is put in programme 2, time 60 minutes and the formula would give me 8km that I have ran (clearly this is just an example of 3 programmes, I have 12).

I can put an IF statement in so that if I put a 1 in the programme and my time in it populates a distance, but I can't work out how to get the formula to change if I do a different programme.

I have attached the spreadsheet for anyone willing to help.  Register To Reply

2. Re: Help with IF formula within excel

Try this:
=VLOOKUP(L23,Programs!\$A\$2:\$F\$25,4,0)*C23/60
Does it meet?  Register To Reply

3. Re: Help with IF formula within excel

That brings up true if the programme has 1-12 in but does not calculate the distance ran...  Register To Reply