![]() |
Data in variable row numbers...
I use the following to find a header located in a row of cells. EndCol var
depends on the dataset size and Sub Call_Data operates on the data below the header (in columns). This is repeated for Val2, Val3 etc.. Col = 1 For i = StrtCol To EndCol If ActiveCell = Val1 Then Call Get_Data Else ActiveCell.Offset(0, Col).Select End If Next i The issue is that data is arranged in blocks, such that the next line of headers+data is in a row below the last block of data (varies with the dataset size). I therefore need: - look for header in row, return data OR - find next header row(done this), change row, look for header, return data Repeat for other rows of headers Repeat for Val2 etc... Nested If, Else procedure probably should do it though can't get one to work. Maybe faster if the macro can look for all Vals (1,2,3) in one row of headers and then move on, though this is way beyond me at present... Any resources, ideas would be great.. M. |
All times are GMT +1. The time now is 07:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com