Hi forum!!

I have a spreadsheet with patient information that another company has asked for in a different format than they used to. Instead of needing it as lines in a spreadsheet, they now want in separate sheets, divided by patient. Currently, each patient’s information is listed in columns A-E, then their charges are F-H… It ends up being that one row A-H is filled out with information then their charges, and the next 2-5 rows are blank in A-E with their charges listed in F-H.

I had sort of made a layout for how the macro would look… Then got completely stuck because I don't know the programming language at all. Hopefully the script can copy the form, rename that copy to the patient’s name, transfer cells from the name spreadsheet to the form, then go to the next like and if A-E are blank, keep working on the current patient’s form by copying F-H into the charges field. If anyone wants to just point me in the right direction on this, without doing all the heavy lifting, any level of assistance at all would be much appreciated!! My biggest struggle is how go to the next line when the script loops through, or specify whatever line it should be working on... I also don’t know how to stop it… the data starts in row 2 and the last line of data is 254.

In rows where columns A-E have patient’s data, the A cell (in the "names" sheet) needs to go to D6 (always this specific cell in the "form" sheet). B to D7, C to H6, I to F8, E to D11, F to B37, H to E37.

In rows where columns A-E are blank on the "names" sheet, this means that we're still filling in data on the form for the above person. I need the datum in column F to go to whatever B cell on the "form" is open underneath B37... That is, if this is the first blank row, it would go in B38, if this is the second blank row for this person I would need it to go in B39, and so on. This is the same for the H datum, which I need to go to E38 and so on.

Then, if the next line has data A-E, it means we're onto the next patient and a new form should be created.

I'm working in Office 2013. Please let me know if any clarification is necessary, I will be checking this often! Thank you so much in advance for your assistance, I will be sure to pay the help forward in any way I can!