Posts by manster_mg

    Dude you're awesome! The code in post 11 worked like a charm. Man I wish I would have had this earlier I just wrote my original code with 98 Dims and a gazillion lines
    haha :)

    I just tried the code on the my attached example and it returned the same Compile error. I'm using Excel 2016 (Office 2016) on Win10. Could that be the issue?

    Removing the extra " resulted in a Compile error: Expected: List separator or ). I tried several combinations of using a ) but VBA seems to want the closing " after the :A

    I tried the code you provided but I received a Run-time error '424': Object required
    The highlighted line was

    For Each c In Range("A6:"A" & Cells(Rows.Count, 1).End(xlUp).Row)

    I'm using Excel 2016.

    I am working with data containing 42 companies, each company has a listing of the products it offers. The company names are in column A, the product lists are in column B. The company name is only listed once with the first product for that company. I need code that will populate the company name for each product for each company. The code posted below is what I have so far but this is obviously not the most efficient method because I would need to declare 84 ranges and write 84+ lines of code. Can anyone suggest a better method perhaps something that involves iteration?

    ps My data always starts at A7