Creating an excel VBA Code

David - Oct 21, 2010 at 07:41 AM
 RayH - Oct 23, 2010 at 09:22 AM

Can you help please, I'm trying to create Excel VBA code to allow me to copy a variable range from sheet "Breakdown", Col B, select sheet "Costings" (in same workbook), search for word SHOT in Col B, find next empty cell below "SHOT" and paste copied items. Return to sheet "Breakdown" Col B and find word "Description" to end the code.

Thanks for help in anticipation

3 replies

Registration date
Sunday June 14, 2009
Last seen
August 7, 2021
Oct 22, 2010 at 01:39 AM
upload a very small extract of your data sheet in speedyshare.conm
delete password and post the web page address of the file.
Many thanks for responding. I'm not a subscriber to Guess that blows me out. However, if not hopefully the following will assist. Sheet Breakdown Col B has value "Description" in cell row 20. The variable range I need to copy, less any blank rows, are immediately below B20. Sheet "Costing" Col B has value "Concept" in row 11 & relevant data is placed in rows 12 to 16. Col B row 17 has value "Assets" & the number of rows required by data relevant to this section can vary. My need is to be able to find the next heading in ColB that has the value "SHOTS" and past the data copied from sheet Breakdown.
So far I've created/cribbed code to allow me to copy the range required and paste ignoring blank rows. I also have code that will find the value "Shots" , but I've been unable to marry the two pieces of code and add the necessary code to paste my data in the rows immediately below "Shots".
If you can offer assistance I'd be extremely grateful. Either way, I thank you very much for your time and interest thus far. David
I don't think you need to be a subscriber to use So it would great to see what you've already acheived rather than having to rewrite from scratch.