JWhitener1986
Technical User
This one has been puzzling me for a few days.
This sheet I am using is attached.
What I am trying to do is create a function that sums up all the containers on the sheet and a function that sums up all the lids. This is a twofold problem:
1. Containers – These are always standalone numbers, or are before a “/” sign. Therefore, a straight summing of the sheet won’t do because it doesn’t count the numbers before the “/” as numbers, but instead as text. I came with this formula to account for these numbers and blank spaces:
=VALUE(LEFT(C6,4))
*It should be noted that the numbers on the left will always be 4 characters.
The problem I’m having is that I can’t come up with a formula that would sum all the boxes in these fields by applying the formula above.
I can do this:
=SUM(VALUE(LEFT(C6,4)),VALUE(LEFT(C7,4)),VALUE(LEFT(8,4))….
But that is going to be huge. I have to believe there is a more efficient way to apply the nested function to all cells and sum it up. Yet, any attempts I’ve made at using SUMIF such as this:
=SUMIF(B6:H8,(IF(C6>0,VALUE(LEFT(C6,4)),0))>0)
Does not work.
Any ideas?
2. Lids – I want to sum up all the numbers that occur after the “/” sign only. Lids will only ever follow a “/” since they are never ordered alone.
The function I came up with to deal with this is:
=REPLACE(C6,1,5," ")
By doing this for every cell with data I can filter out only the numbers I want (And it allows the second number to be of variable length because it can be either 4 or 5 characters long) . Yet, I have the same problem as above, in that I can’t get a SUMIF function that correctly applies this rule so that I can get the box below the label “Total Lids” to display the total of these numbers.
This is my best attempt:
=SUMIF(B6:H8,REPLACE(C6,1,5," ")>0)
Again, I could write a massive SUM function that uses the REPLACE function for each cell in turn like I could do above, but it would be so cumbersome.
I’m hoping someone out there has any ideas because all my scourings for solutions have turned up nothing.
Thank you sincerely for any help you can offer.
This sheet I am using is attached.
What I am trying to do is create a function that sums up all the containers on the sheet and a function that sums up all the lids. This is a twofold problem:
1. Containers – These are always standalone numbers, or are before a “/” sign. Therefore, a straight summing of the sheet won’t do because it doesn’t count the numbers before the “/” as numbers, but instead as text. I came with this formula to account for these numbers and blank spaces:
=VALUE(LEFT(C6,4))
*It should be noted that the numbers on the left will always be 4 characters.
The problem I’m having is that I can’t come up with a formula that would sum all the boxes in these fields by applying the formula above.
I can do this:
=SUM(VALUE(LEFT(C6,4)),VALUE(LEFT(C7,4)),VALUE(LEFT(8,4))….
But that is going to be huge. I have to believe there is a more efficient way to apply the nested function to all cells and sum it up. Yet, any attempts I’ve made at using SUMIF such as this:
=SUMIF(B6:H8,(IF(C6>0,VALUE(LEFT(C6,4)),0))>0)
Does not work.
Any ideas?
2. Lids – I want to sum up all the numbers that occur after the “/” sign only. Lids will only ever follow a “/” since they are never ordered alone.
The function I came up with to deal with this is:
=REPLACE(C6,1,5," ")
By doing this for every cell with data I can filter out only the numbers I want (And it allows the second number to be of variable length because it can be either 4 or 5 characters long) . Yet, I have the same problem as above, in that I can’t get a SUMIF function that correctly applies this rule so that I can get the box below the label “Total Lids” to display the total of these numbers.
This is my best attempt:
=SUMIF(B6:H8,REPLACE(C6,1,5," ")>0)
Again, I could write a massive SUM function that uses the REPLACE function for each cell in turn like I could do above, but it would be so cumbersome.
I’m hoping someone out there has any ideas because all my scourings for solutions have turned up nothing.
Thank you sincerely for any help you can offer.