Home

Replicate Rows With Some Data From Another Sheet - Excel Programming

%3CLINGO-SUB%20id%3D%22lingo-sub-622138%22%20slang%3D%22en-US%22%3EReplicate%20Rows%20With%20Some%20Data%20From%20Another%20Sheet%20-%20Excel%20Programming%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-622138%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3ECould%20someone%20please%20assist%20with%20the%20following%3A%3C%2FP%3E%3CUL%3E%3CLI%3EAttached%20file%20has%202%20sheets%3C%2FLI%3E%3CLI%3ESheet1%20(cities)%20has%20the%20list%20of%20cities%20and%20states%20they%20belong%20to.%3C%2FLI%3E%3CLI%3ESheet2%20(Criteria)%20needs%20to%20be%20populated%20for%20each%20city%20with%20values%20from%20the%20preceding%20row%20repeated%20and%20the%20one%20value%20(for%20state)%20being%20picked%20up%20from%20the%20first%20sheet%20(Cities).%3C%2FLI%3E%3CLI%3ENew%20rows%20should%20be%20inserted%20after%20the%20last%20row%20containing%20data%20(next%20empty%20row).%3C%2FLI%3E%3CLI%3EBefore%20the%20rows%20are%20inserted%2C%20Value%20in%20Colname10%20should%20be%20emptied.%3C%2FLI%3E%3CLI%3EThe%20above%20to%20be%20achieved%20with%20the%20help%20of%20a%20button.%20A%20yes%20or%20no%20popup%20should%20also%20be%20displayed%20before%20the%20rows%20are%20inserted.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EThank%20you%2C%20Nick%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-622138%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Spicierboar
New Contributor

Hi,

Could someone please assist with the following:

  • Attached file has 2 sheets
  • Sheet1 (cities) has the list of cities and states they belong to.
  • Sheet2 (Criteria) needs to be populated for each city with values from the preceding row repeated and the one value (for state) being picked up from the first sheet (Cities).
  • New rows should be inserted after the last row containing data (next empty row).
  • Before the rows are inserted, Value in Colname10 should be emptied.
  • The above to be achieved with the help of a button. A yes or no popup should also be displayed before the rows are inserted.

Thank you, Nick