Hello,

I have a large dataset that is split into several columns. However, this is an aggregated dataset for many sub-datasets. It is set up in the following way:

The sub-datasets being each of the different sites. I am trying to find the slope of the log-log graph for y1,2,3 vs. x for each site. Therefore there will be 3 slopes that I need for each site (sub-set). The lengths of the site subsets are variable (i.e. not all subsets are the same length).

Being a newbie, I cannot seem to wrap my head around a VBA program(s) that can (1) determine the length of each subset, and (2) find the corresponding log-log slopes for y1,2,3 vs. x for that subset, and (3) write these slopes to a new worksheet.

Any help would be greatly appreciated.

I have a large dataset that is split into several columns. However, this is an aggregated dataset for many sub-datasets. It is set up in the following way:

Site Name | x | y1 | y2 | y3 |

Site 1 | 2 | 45 | 65 | 24 |

Site 1 | 4 | 36 | 69 | 45 |

Site 1 | 3 | 55 | 89 | 32 |

Site 2 | 5 | 34 | 23 | 15 |

Site 2 | 9 | 135 | 64 | 76 |

Site 2 | 8 | 53 | 234 | 265 |

Site 2 | 2 | 37 | 756 | 456 |

Site 3 | 5 | 435 | 34 | 567 |

Site 3 | 1 | 65 | 24 | 36 |

Being a newbie, I cannot seem to wrap my head around a VBA program(s) that can (1) determine the length of each subset, and (2) find the corresponding log-log slopes for y1,2,3 vs. x for that subset, and (3) write these slopes to a new worksheet.

Any help would be greatly appreciated.

## Comment