Hi,
Im really stuck and getting nowhere fast, mainly because I dont know VB. Im pretty good when it comes to excel formulas, but it looks like what I am tring to do will only work through VB, and it isnt a really complicated issue either, just I have no idea what I am doing when it comes to VB.
So this is what Im tring to do, We download a payment run from SAP into excel, but even though it is in columns its always messy to work with, a macro, which I have recorded is working and does sort out the data into a new tab. The problem is this only works for 1 entity, (Belgium) but we have many entites, France, Spain etc, which always seems to come out in a different yet similar layout, it maybe a few columns out, or include extra columns I dont want, this means that my macro will not work, unless the layout is exactly the same as the the 1st entity which the Macro was recorded, (Belgium)
So what I will end up with is 1 spreadsheet, where I drop the data into a tab called Downloaded Raw Proposal, do a new Macro / VB code where it will look for the columns it needs, ie search by headers, then copy the entire column, inc all the data and paste it into the relevent column as shown below.
[TABLE="width: 0"]
<tbody>[TR]
[TD]Cell Ref needed
[/TD]
[TD]Description
[/TD]
[/TR]
[TR]
[TD]D5
[/TD]
[TD]Payment
[/TD]
[/TR]
[TR]
[TD]F6
[/TD]
[TD]CoCd
[/TD]
[/TR]
[TR]
[TD]I6
[/TD]
[TD]DocumentNo
[/TD]
[/TR]
[TR]
[TD]L6
[/TD]
[TD]Type
[/TD]
[/TR]
[TR]
[TD]M6
[/TD]
[TD]Doc Date
[/TD]
[/TR]
[TR]
[TD]O6
[/TD]
[TD]Blind Date
[/TD]
[/TR]
[TR]
[TD]R6
[/TD]
[TD]PayT
[/TD]
[/TR]
[TR]
[TD]T6
[/TD]
[TD]FC gross amount
[/TD]
[/TR]
[TR]
[TD]U6
[/TD]
[TD] Tot.ded.in FC
[/TD]
[/TR]
[TR]
[TD]V6
[/TD]
[TD]Net amnt. in FC
[/TD]
[/TR]
[TR]
[TD]W6
[/TD]
[TD]Crcy
[/TD]
[/TR]
[TR]
[TD]Y6
[/TD]
[TD]Err
[/TD]
[/TR]
</tbody>[/TABLE]
I have attached two pictures of the correct layout and the wrong layout, the columns and data must always be in the same layout as the correct picture, however these layouts except the correct one always change per entity, so they might also change on the next download, or if someone else runs them.
We and our IT \ SAP Consultants have been unable to change the layouts in SAP for the pay proposals, which is why we need this template file.
In the attached spreadsheet the Tab named New Raw data dump, contains a report which is the wrong layout,
The yellow tab - Download Raw Proposal - is where the Macro (red tab) - Run Report picks up the data and the blue tab is where is put in a more user friendly way.
I hope I have explained it well.
Help would be highly gratefully received.
Hi,
Im really stuck and getting nowhere fast, mainly because I dont know VB. Im pretty good when it comes to excel formulas, but it looks like what I am tring to do will only work through VB, and it isnt a really complicated issue either, just I have no idea what I am doing when it comes to VB.
So this is what Im tring to do, We download a payment run from SAP into excel, but even though it is in columns its always messy to work with, a macro, which I have recorded is working and does sort out the data into a new tab. The problem is this only works for 1 entity, (Belgium) but we have many entites, France, Spain etc, which always seems to come out in a different yet similar layout, it maybe a few columns out, or include extra columns I dont want, this means that my macro will not work, unless the layout is exactly the same as the the 1st entity which the Macro was recorded, (Belgium)
So what I will end up with is 1 spreadsheet, where I drop the data into a tab called Downloaded Raw Proposal, do a new Macro / VB code where it will look for the columns it needs, ie search by headers, then copy the entire column, inc all the data and paste it into the relevent column as shown below.
[TABLE="width: 0"]
<tbody>[TR]
[TD]Cell Ref needed
[/TD]
[TD]Description
[/TD]
[/TR]
[TR]
[TD]D5
[/TD]
[TD]Payment
[/TD]
[/TR]
[TR]
[TD]F6
[/TD]
[TD]CoCd
[/TD]
[/TR]
[TR]
[TD]I6
[/TD]
[TD]DocumentNo
[/TD]
[/TR]
[TR]
[TD]L6
[/TD]
[TD]Type
[/TD]
[/TR]
[TR]
[TD]M6
[/TD]
[TD]Doc Date
[/TD]
[/TR]
[TR]
[TD]O6
[/TD]
[TD]Blind Date
[/TD]
[/TR]
[TR]
[TD]R6
[/TD]
[TD]PayT
[/TD]
[/TR]
[TR]
[TD]T6
[/TD]
[TD]FC gross amount
[/TD]
[/TR]
[TR]
[TD]U6
[/TD]
[TD] Tot.ded.in FC
[/TD]
[/TR]
[TR]
[TD]V6
[/TD]
[TD]Net amnt. in FC
[/TD]
[/TR]
[TR]
[TD]W6
[/TD]
[TD]Crcy
[/TD]
[/TR]
[TR]
[TD]Y6
[/TD]
[TD]Err
[/TD]
[/TR]
</tbody>[/TABLE]
I have attached two pictures of the correct layout and the wrong layout, the columns and data must always be in the same layout as the correct picture, however these layouts except the correct one always change per entity, so they might also change on the next download, or if someone else runs them.
We and our IT \ SAP Consultants have been unable to change the layouts in SAP for the pay proposals, which is why we need this template file.
In the attached spreadsheet the Tab named New Raw data dump, contains a report which is the wrong layout,
The yellow tab - Download Raw Proposal - is where the Macro (red tab) - Run Report picks up the data and the blue tab is where is put in a more user friendly way.
I hope I have explained it well.
Help would be highly gratefully received.