Create VBA code - Inserting a row in other worksheets based on meeting a criteria

jreed5535

New Member
Joined
Jul 25, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

Am a novice when it comes to VBA, generally find the codes i need from google but cannot find one that helps me this time.

I will try my best to describe what the file is doing and what i am trying to achieve.

The file has a series of worksheets (Parent Projects), with each containing a list of children projects and the data relating to them. The data for these projects is pulled in via a formula from other worksheets (where the reports are dumped in). I have a formula in one of the worksheets (call it Worksheet1) that in column X will have a 0 next to the project if it is missing from its Parent Project worksheet.

I am hoping to be able to create a code that will identify what project is missing (from worksheet1), do a vlookup on the parent project number to know what worksheet to add it to, insert a row (say row 100), Copy and paste the formulas from the row above, copy and paste the child project number (say to column C) and then run the code again until there are no more 0's in column X. (all the missing children projects have been added to their parent project worksheet)

Also, if possible i would like to run this macro from a seperate workbook, if not, its not a big deal.

Hope what i am trying to achieve makes sense, if not i can try and clarify any queries.

Cheers,
James
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Watch MrExcel Video

Forum statistics

Threads
1,113,903
Messages
5,544,962
Members
410,643
Latest member
sng
Top