ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Single Row to Multiple Row Determination (https://www.excelbanter.com/excel-programming/427225-single-row-multiple-row-determination.html)

Jim

Single Row to Multiple Row Determination
 
I have an excel spreadsheet feed that, for any row A may cover multiple rows
of B. How do I determine programmatically the range of B rows that are
included "within" row A1? (I will be merging all the text contained in the B
rows into one cell for each value of A.) The data is arranged similar to the
following;

A1 B1
B2
B3
B4
A2 B5
B6
A3 B7


Barb Reinhardt

Single Row to Multiple Row Determination
 
I'm not exactly sure what you're doing, but you could try doing something
like this

Dim r as Range
for each r in ActiveSheet.UsedRange
if r.mergearea.count 1 then
Debug.print r.mergearea.address
end if
next r

"Jim" wrote:

I have an excel spreadsheet feed that, for any row A may cover multiple rows
of B. How do I determine programmatically the range of B rows that are
included "within" row A1? (I will be merging all the text contained in the B
rows into one cell for each value of A.) The data is arranged similar to the
following;

A1 B1
B2
B3
B4
A2 B5
B6
A3 B7



All times are GMT +1. The time now is 07:27 AM.

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