Apr 30 2018
11:07 AM
- last edited on
Jul 25 2018
09:58 AM
by
TechCommunityAP
Apr 30 2018
11:07 AM
- last edited on
Jul 25 2018
09:58 AM
by
TechCommunityAP
Hi,
I want to perform this action.
Pozo | mD | Termina Producción | |||||
Cima | Base | ||||||
Sam-996 | 962 | 978 | 1 | Sam-996 | 962 | 1 | |
Iride-725 | 1137 | 1140 | Sam-996 | 978 |
So far i´ve been using this macro, but i want this action to be repeated in all the sheet (1500 lines).
Sub Macro6()
'
' Macro6 Macro
'
'
Range("B4").Select
Selection.Copy
Range("G4").Select
ActiveSheet.Paste
Range("C4").Select
Application.CutCopyMode = False
Selection.Copy
Range("G5").Select
ActiveSheet.Paste
Range("D4").Select
Application.CutCopyMode = False
Selection.Copy
Range("H4").Select
ActiveSheet.Paste
Range("A4").Select
Application.CutCopyMode = False
Selection.Copy
Range("F4").Select
ActiveSheet.Paste
Range("F4").Select
Application.CutCopyMode = False
Selection.Copy
Range("F5").Select
ActiveSheet.Paste
End Sub
Any help would be awesome.
Apr 30 2018 11:29 AM
Hi Angel,
Please explain more about what you are trying to do.
Apr 30 2018 11:43 AM
Hi Haytham Amairah,
What im trying to do, is transpone column B and C, Paste column A twice and paste column C aside the value in column B. I need repeat that action in 1500 lines.
Pozo | mD | Termina Producción | |||||
Cima | Base | ||||||
Sam-996 | 962 | 978 | 1 | Sam-996 | 962 | 1 | |
Iride-725 | 1137 | 1140 | Sam-996 | 978 |
Excuse me if im not being clear :(
Apr 30 2018 12:10 PM
SolutionHi,
This can be done by using Power Query which is also known as (Get & Transform Data in Excel 2016), and if you don't have Excel 2016, then you have to download and install Power Query Add-in.
The Power Query is much easier than Macros and VBA.
Please find the attached file and try to update the left table, then right-click on the right table and select Refresh to see how it will be updated.
Regards
May 02 2018 09:46 AM
Hi Haytham Amairah,
On monday i received your help, but i have an incovinient in the example provided one column is missing and i´ve been trying to change the arrangement without success.
In the image, there is a better explanation.
In advance, thanks for yur help.
May 02 2018 07:33 PM
Hi Angel,
I've updated the attached workbook with the possible solution.
Hope that helps
Apr 30 2018 12:10 PM
SolutionHi,
This can be done by using Power Query which is also known as (Get & Transform Data in Excel 2016), and if you don't have Excel 2016, then you have to download and install Power Query Add-in.
The Power Query is much easier than Macros and VBA.
Please find the attached file and try to update the left table, then right-click on the right table and select Refresh to see how it will be updated.
Regards