+ Reply to Thread
Results 1 to 3 of 3

hi need to develop a macro that can copy data to another sheet, perform calculations

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    delhi
    MS-Off Ver
    Excel 2007
    Posts
    2

    hi need to develop a macro that can copy data to another sheet, perform calculations

    Hi,
    I am totally new to Macros. I have a worksheet named "Raw File" which is sent to me every 2 weeks. The column position and their headings remain the same, but the number of rows changes. It contains historical and current month information.
    Thus I want to copy this whole data (for specific columns) into a new worksheet called "Main File". Again in this file the column position and their Heading would remain the same always. However, I need to calculate some numbers on the basis of current month information. Like Year Till Date (YTD) = sum of values till the current month. Every time the month changes, the calculations should automatically change i.e sum should include that month's data; the division should be done by that month's Number (eg. Jun =6; July =7)

    1. Thus I need a code which can copy the specific data.
    2. Also, ask the user to choose the latest month and basis that make the calculations.
    3. Look up at some base files to pick related information. Eg Base File 1,2,3
    4. Group values on the basis of Family Name. Eg. Family id is unique and final information is to be combined on the basis of Family names. The Prod ids are also unique, but many prod id can have same Family id.
    5. And display information in the format as Worksheet "Öutput File".

    Its too huge and complex for me to explain properly. I tried to search on the net and do this myself, but got confused. Any advice would be a big help to me.

    Thanks in advance.

    I am attaching the excel workbook for better understanding.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-09-2012
    Location
    Maldives
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: hi need to develop a macro that can copy data to another sheet, perform calculations

    You can do one thing..
    First macro record copy wat ever you want frm on sheet to another then one worksheet ....
    Macro2 create next macro like this

    Please Login or Register  to view this content.
    So can be another workbook with you copied data
    Last edited by jeffreybrown; 10-12-2012 at 11:52 PM. Reason: Please use code tags...Thanks.

  3. #3
    Registered User
    Join Date
    10-12-2012
    Location
    delhi
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: hi need to develop a macro that can copy data to another sheet, perform calculations

    thanks
    How do I sum values for a specific number of columns.

    Eg. reference number = 4. Sum always from A2
    So I want to sum values from A2 to D2; and do it similarly for the rest of the rows. the number of rows keep on changing every month.

    if reference number=6; sum values from A2 to F2

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1