Solved

Excel Macro

Posted on 2014-01-08
8
349 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 26

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 26

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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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 26

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

My experience with Windows 10 over a one year period and suggestions for smooth operation
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now