Three spreadsheets to become one

vintage36

Board Regular
Joined
Nov 29, 2011
Messages
58
I keep records of electricity, gas and water consumption, which at the moment are on individual spreadsheets. I want to create a functioning spreadsheet of three original sheets to contain those I first mentioned.

Copy and paste seems not to work, as each new item posted to the recipient sheet appears to remove the previous one. (?)

How should I go about this, please?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Is the data layout the same in each worksheet ... : Same Header ?
 
Upvote 0
Perhaps next code
Code:
Option Explicit


Sub CompilData()
Const DstWsN = "Review"
Const OrgWsLst = "Data1,Data2,Data3"
Dim WsN
    For Each WsN In Split(OrgWsLst, ",")
        With Sheets(WsN)
            .UsedRange.Offset(1, 0).Copy Destination:=Sheets(DstWsN).Cells(Rows.Count, 1).End(3)(2)
        End With
    Next WsN
End Sub

Adjust Const DstWsN = "Review"
Code:
Const OrgWsLst = "Data1,Data2,Data3"
to your need
 
Last edited:
Upvote 0
Is the data layout the same in each worksheet ... : Same Header ?
The worksheets do not have headers.
The layouts will differ, because the information required for each is slightly different. The column names will vary as well.
 
Upvote 0
Also the code entries are not understood. What does each line mean or do, please? What goes in for Data1, Data2, Data3?
 
Upvote 0
Data1, Data2, Data3
is the name of the input sheets and you have to custom them with yours names.
The layouts will differ, because the information required for each is slightly different. The column names will vary as well.

Without more information it is not possible to prepare a macro

The worksheets do not have headers.
So how to align the data ???

 
Last edited:
Upvote 0
You are the one with the Pb ...!
We can wait.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top