How to pick data upto a formatted row in table

Hi @jack.chan and everyone

I have a excel file like this


Now What I want to do is only pick the data which is above the formatted line. I have multiple excel sheets where I have this situation of formatted lines. Requirement is whenever a formatted line is detected in the excel sheet. Only the data above the formatted line should be picked rest should be ignored

Final Output.


1 Like


put vba.txt and testx.xaml in the same folder
vba.txt (434 Bytes)
test.xlsx (12.4 KB)
Testx.xaml (11.5 KB)

in testx.xaml, i assume your input sheet name = “Sheet1” , if otherwise change it


result (result sheet)

I was trying to apply this code on the below file I was getting an assign Error

Error -

File -
ATPDump.XLSX (49.1 KB)

because 1st row was highlighted in a different, use this vba code instead

vba.txt (544 Bytes)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.