Hi
I am new to Mr Excel, returning to VBA after many years' break (I've been using power query for most of my solutions) and am hoping that some of you clever people will be able to solve my conundrum.
I have a spreadsheet that picks up data from another sheet from the same workbook, does a few lookups and presents the data in a different format.
Each line in the extract below represents an equipment installation that needs to be completed, and the Qty in column G shows how many instances of that installation will need to take place. If only 1 installation, then nothing needs to happen but if there are more than one, we need to insert additional rows and filldown the formulas for the whole row, and then overwrite the values in column G to 1. Then move on to the next one.
The formulas in columns D, E and F are based on the number in column C. So, for example, rows 33 to 35 need to say 22. Formulas from column G onwards are then based on the combined values of C, D, E and F.
The numbers in Column C are currently manually input until we get the result "No more data" (see below). I'm wondering if there is another macro that could be built in to automate this process too.
I have managed to find a macro that will insert the extra rows but I am having trouble with filling down the formulas. For the life of me I cannot work out how to tell it to stop when the result in column D says "No more data". The last thing I tried ended up in a never-ending loop!
This is all I have so far:
Any help you can give me would be very much appreciated.
Yours hopefully,
AliB
I am new to Mr Excel, returning to VBA after many years' break (I've been using power query for most of my solutions) and am hoping that some of you clever people will be able to solve my conundrum.
I have a spreadsheet that picks up data from another sheet from the same workbook, does a few lookups and presents the data in a different format.
Each line in the extract below represents an equipment installation that needs to be completed, and the Qty in column G shows how many instances of that installation will need to take place. If only 1 installation, then nothing needs to happen but if there are more than one, we need to insert additional rows and filldown the formulas for the whole row, and then overwrite the values in column G to 1. Then move on to the next one.
The formulas in columns D, E and F are based on the number in column C. So, for example, rows 33 to 35 need to say 22. Formulas from column G onwards are then based on the combined values of C, D, E and F.
The numbers in Column C are currently manually input until we get the result "No more data" (see below). I'm wondering if there is another macro that could be built in to automate this process too.
I have managed to find a macro that will insert the extra rows but I am having trouble with filling down the formulas. For the life of me I cannot work out how to tell it to stop when the result in column D says "No more data". The last thing I tried ended up in a never-ending loop!
This is all I have so far:
Any help you can give me would be very much appreciated.
Yours hopefully,
AliB