I've been struggling with this problem for a whole month...
Here is the point. I've got a sheet in excel called Amounts
where there are many datas listed under 10
columns from cell A2
to cell J2
. The last colum can vary day to day. There are headnames above those different datas that allows me to know the type of data.
Anyway, there are many columns where the header start with the following value Amount of (date)
. I want to make a code that;
- Allows me to search automatically for all the columns'name that starts with the value
Amount of
- Copy all of the data below (from the first data until the last one). The range of datas under each column can vary from day to day.
- And finally paste each of the range data copied under the column header on other sheet and in one single column (starting in cel(1,1)).
Here's how my current code looks like;
Dim cel As Range
With Sheets("Amounts")
Worksheets("Amounts").Activate
For Each cel In Range("A2", Range("A2").End(xlToRight)
If cel.Value Like "Amount in USD *" Then
cel.Offset(1).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy Worksheets("Pasted Amounts").Range("A2")
End If
Next cel
Could you please help me with this...? I feel like the answer is so obvious like the nose in the middle of my face.