ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Big Sumif (https://www.excelbanter.com/excel-worksheet-functions/85416-big-sumif.html)

rajubabuno1

Big Sumif
 

Hey all,

Basically I am trying to work out a sum. I have a grid with distances
between cities, and I want to sum the ones I indicate by making bold.
Any ideas?

Thanks in advance

Raju


--
rajubabuno1
------------------------------------------------------------------------
rajubabuno1's Profile: http://www.excelforum.com/member.php...o&userid=33873
View this thread: http://www.excelforum.com/showthread...hreadid=536520


Pete_UK

Big Sumif
 
No formula would be able to detect the fact that you have emboldened a
cell, so you would have to develop a macro to do it that way.
Alternatively, you could devise some other way of indicating which
cities you want to be included - for example, in cells A1 to A10 you
could have several pull-downs using the list of cities as another way
of indicating your choices.

Hope this helps.

Pete


[email protected]

Big Sumif
 
to avoid any programming you could add another column to input "X" into
as an indicator of your choice, using if statements afterwards


rajubabuno1

Big Sumif
 

I think I need to explain something:

I have 12 cities, and I'm planning a route between them. As a student
of math, I know how to find the shortest distant - I just want to say
if I start A then go to C D G H, how far will I travel.

Thanks a lot


Raju


--
rajubabuno1
------------------------------------------------------------------------
rajubabuno1's Profile: http://www.excelforum.com/member.php...o&userid=33873
View this thread: http://www.excelforum.com/showthread...hreadid=536520


Pete_UK

Big Sumif
 
I presume you have a table of the distances between each city, A to L
across and L to A down giving you a triangular grid.

You can use the MATCH( ) function to determine which column your
starting city is in and embed this within an INDEX( ) function to
obtain the mileage at the intersection of the row where your second
city is. The second city is then the starting city for the second
journey to the third city, so you can easily build up a composite
journey this way, and then just total the mileages.

You would need to specify the cities, and I suggested having validated
pull-downs using the list of cities you already have.

Hope this helps.

Pete



All times are GMT +1. The time now is 11:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com