![]() |
Shifting data down
I have a form that pastes data into a worksheet. I have informatio
about half way down the page. How do I shift that data down so tha new information coming in from my text box can be placed between th top and that other data. Right now my code just starts pasting after the heading that is in th middle of the page. With Worksheets("Notes") cLastRow = .Cells(Rows.Count, "G").End(xlUp).Row .Cells(cLastRow + 2, "G").Value = "Top Number: " & TopNum.Text .Cells(cLastRow + 3, "G").Value = "Part Number: " & LPartNum.Text .Cells(cLastRow + 4, "G").Value = LNotes_Box.Text Any Suggestion? Thank you, Morr -- Message posted from http://www.ExcelForum.com |
Shifting data down
A bit more details on the layout of your sheet will help
Do you have data above the headings? If yes is there blank rows between this data and the heading if yes you could use With Worksheets("Notes") cUseRow = .Cells(1, "G").End(xlDown).Row+1 ' may need to change this to insert muliple rows rows(cuserow).Insert Shift:=xlDown ..Cells(cUseRow + 2, "G").Value = "Top Number: " & TopNum.Text ..Cells(cUseRow + 3, "G").Value = "Part Number: " & LPartNum.Text ..Cells(cUseRow + 4, "G").Value = LNotes_Box.Text --- Message posted from http://www.ExcelForum.com/ |
Shifting data down
Thank you for your help. I'm sorry it took me so long to reply
-- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 08:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com