Calculating a distance with if statments

bboysen

New Member
Joined
Aug 6, 2010
Messages
44
Hello once again!!!!

I have this formula that works but I need to expand it!

This is what i have:
=IF(K4="XR",IF(B4=INDEX(B$5:B14,MATCH(1E+100,IF(K$5:K14="XR,B$5:B14))),"",B4-INDEX(B5:B14,MATCH("XR",K5:K14,0))),"")

This will give me a distance from once xr to the next xr but now i need to get it to work from xr to either a xr, xw, xwtc.

I have tried or and using the +, but that will not work i just get #VALUE.

So in the B column i have a number lets say

B2= 100.00 & K2=XR
B3= 150.00 & K3=XW distance between the two is 50 in say column AD
B4= 160.00 & K4=XWTC distance between the two is 10 in say column AD

and so on.

If you need more info please let me know. I have hit a dead end and hope the master minds on here can help.

Thanks
 

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