Transposing and calculating formula

FORDFAN

New Member
Joined
Nov 2, 2016
Messages
18
Help?

I have created a mileage chart for site to site distances. The sites are listed horizontally and vertically. The bottom half is the distances between sites, the top half is for the cost. It's this that I am trying to calculate.

B2 = distance 1 = 100
B3 = distance 2 = 150
B4 = distance 3 = 200
B5 = distance 4 = 130
B6 = distance 5 = 50

Horizontally, I want a formula that will read the columns down and calculate the cost hoizontally. In the first cost cell reference A2, I have the formula:

=IF(B2>50,(B2+50)/2,50)

If the mileage is over 50 miles, the cost is £50+£0.50/additional mile. If less than 50 miles, it's a static cost of £50.

When I try to autofill the formula horizontally, it changes the cell references horizontally (C2,D2,E2,etc). I want to fill to the right but have it calculate using b3,b4,b5,etc.

Can anyone help?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Re: Need help with transposing and calculating formula

try this in A2, and copy across

=MAX(SUM($B$2:B2)*0.5,50)
 
Upvote 0
Re: Need help with transposing and calculating formula

try this in A2, and copy across

=MAX(SUM($B$2:B2)*0.5,50)

Hi.

Almost. It works in A2 but when I copy it across, it changes the 'B2' to C2, D2, E2, etc. It's not using B3, B4, B5, etc.

I don't know if a TRANSPOSE function is needed but everything I've tried has failed.
 
Upvote 0
Try using INDEX like this:

=MAX((INDEX($B2:$B6,COLUMNS($C1:C1))+50)/2,50)

I'm assuming that goes in C1 copied across - Make B2:B6 as big as you need
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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