Solved

Excel Macro

Posted on 2014-01-08
8
370 Views
Last Modified: 2014-01-13
Hi,

I am doing a task manually . Copying contents from web and paste it in a excel file on the corresponding heading.

I need your help on automating it.

The desired input and output sheet is attached.

The data need to populated based on headings to corresponding cells.

Thanks,
Magento
0
Comment
Question by:magento
  • 4
  • 3
8 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39766538
Nothing attached.
0
 
LVL 5

Author Comment

by:magento
ID: 39766550
I am sorry .

Please find the attached.
sample-2.xlsx
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39766612
Not really enough information to do anything with.

Do you want to automate the data download too? If so, what's the link?
Where's the source/destination? in the same file? separate files?
Anyway you can check out http://office.microsoft.com/en-us/excel-help/rotate-data-by-converting-columns-to-rows-or-vice-versa-HP005203138.aspx to convert columns to rows.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
ID: 39766629
Moreover, you should check Excel's built-in pivot stuff, as shwon here: http://chandoo.org/wp/2009/08/19/excel-pivot-tables-tutorial/

or try to google ;-) (pivoting excel)
0
 
LVL 5

Author Comment

by:magento
ID: 39767090
Hi Macroshadow,

The first sheet is the input and the second sheet is the output.

I paste the content in sheet1 and run the macro , need the output in sheet 2.

Thanks
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39767290
This is the gist of it:
Sub Demo()

    Dim rngSource As Range
    Dim rngDestination As Range
    
    Set rngSource = Sheets("Given").Range("A1:B71")
    Set rngDestination = Sheets("Required").Range("A1:B71")
    
    rngSource.Copy
    rngDestination.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
    
End Sub

Open in new window


For lack of details I couldn't give a more accurate solution. For example:
1. Is the macro supposed to overwrite existing data?
2. Will there always be one header column and one data column, or will they vary?
0
 
LVL 5

Author Comment

by:magento
ID: 39767837
Hi Macroshadow,

Thanks for this.

I will open a new question with the answer to the above post .

Thanks again
0
 
LVL 5

Author Comment

by:magento
ID: 39776788
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
My experience with Windows 10 over a one year period and suggestions for smooth operation
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question