![]() |
macro copy/paste data from multiple cells to multiple cells
I am trying to copy and past date from multiple cells on one sheet to
multiple cells on another sheet. For example A1,B1 and C1 (sheet x) to D1 (sheet y) and F1,G1 (sheet) to P1 (sheet y). I am allowed to have only one macro and the data has to be copied and populated at the same time. Is there an easy way to do this. Any help is greatly appreciated Thanks This is what I have so far but it gives me error message Sub SubmitAll() Dim ActualSheet As String Dim Target1 As String Target1 = Range("H1").Value X (Target1) Dim Target2 As String Target2 = Range("M1").Value2 Y (Target2) End Sub _______________________________________________ Sub X(pos As String) Dim Text1 As String Range("H1").Select Text1 = Range("H2").Value + Range("H3").Value + Range("H4").Value Sheets("User Admin Form").Select Range(pos).Value = Text1 AutoFit End Sub ____________________________________ Sub Y(pos As String) Dim Text1 As String Range("M1").Select Text1 = Range("M2").Value + Range("M3").Value + Range("M4").Value Dim Text1 As String Sheets("ActiveSheet.Name").Visible = 0 Sheets("User Admin Form").Select Range(pos).Value = Text1 AutoFit End Sub |
All times are GMT +1. The time now is 07:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com