excel vba - Appending ranges based on a two dimensional conditional loop and exporting to a PDF -
i've tried looking @ other questions, doesn't seem work me. have worksheet called materialflow in have many columns , rows need columns (ones hard code) , rows (ones have word "card") in 8th column copied tab exported pdf keep getting errors. here code. i've managed copy "card" containing rows don't know how simultaneously of columns , associated headers. additionally, column qualifies row excluded, makes difficult. sub racks_list() dim sws worksheet dim rl worksheet set sws = sheets("materialflow") set rl = sheets("reports") dim slr long dim sr long dim l long dim counter range dim comb_range range dim bigrange range dim headers range dim cardcount long dim mycount long cardcount = 0 mycount = 1 each counter in worksheets("materialflow").range("h9", "h500") if counter.value = "card" cardcount = cardcount + 1 if mycount = 1 set comb_range = counter.entirerow ...