How to sum a row until text appears in an another row

whitenk

New Member
Joined
Nov 5, 2011
Messages
3
Time spent on each page appears in row 18.
Need to sum up all of these pagetimes for each site, to get the total time on site.
So in the example below,
D19 would reflect the total time spent on GreenElectricalSupply.com sum of cells D18-G18(1:23.0)
and H19 would display the total time spent on Rexel.com (00:45.0)

So I am trying to figure out how to do a conditional sum across row 18, until a new site begins (indicated by the appearance of text in the next cell of row 8).


thanks!


Excel Workbook
CDEFGHI
8greenelectricsupply.comrexel.comnextag.com
9WW ONLY: Arrived at site viaURL (AddressBar)URL (AddressBar)
15Page Type (Home, category, content)HomeCategoryCategoryHomeHomeHome
16Page start time02:34.002:50.003:00.003:23.004:00.004:46.0
17Page leave time02:50.002:59.003:22.003:59.004:45.005:02.0
18Time on page00:16.000:09.000:22.000:36.000:45.000:16.0
19Time on site (seconds)
Data
Excel 2007
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
It's not the most elegant solution in the world, but I think this will work. It uses the iferror function so this will only work in XL07 and up.

Enter in Cell D19.

Enter as an array formula (control + shift + enter)

Code:
=IF(D8<>"", SUM(OFFSET(D18, 0, 0, 1, IFERROR(MATCH(TRUE, OFFSET(E8, 0, 0, 1, 100)<>"", 0), 1))), "")
It checks for another text in row 8 for the next 100 columns, so if the length of possible columns between websites is more than that it won't work.

Dean.
 
Upvote 0
Thanks dean. I am using excel 2007 but I get an error when I enter this formula. It looks like part of it is missing at the end (at least there are no closing parentheses). Maybe some got cut off?
(I tried just adding close parentheses but seems like there is still something missing.)
 
Upvote 0
Thanks dean. I am using excel 2007 but I get an error when I enter this formula. It looks like part of it is missing at the end (at least there are no closing parentheses). Maybe some got cut off?
(I tried just adding close parentheses but seems like there is still something missing.)
Slide the horizontal scroll bar underneath the formula to see all of the formula.
 
Last edited:
Upvote 0
thanks! that formula works perfectly.
(the horizontal scroll bar wasn't showing up on my mobile phone :)
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,677
Members
449,092
Latest member
tayo4dgacorbanget

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