+ Reply to Thread
Results 1 to 15 of 15

Facing error when applying macro for pivot table concepts

  1. #1
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Facing error when applying macro for pivot table concepts

    Details of my macro:

    macro that will move and total some data from 7 worksheets to a tally worksheet in the same workbook.
    we have used a pivot table to do this.Due to difficulty of manual effort we are came with macro to do this.
    I have included a sample of the workbook with 2 data sheets and the tally sheet.
    for each customer number in col a I need it to copy col b,i,j,o and m.
    I then need it to sum the total of col c from the store data sheet and put in col f of the tally worksheet,
    sum the total of col d from the store data sheet and put in col g of the tally worksheet and sum the total of col e from the store data sheet
    and put into col h of tally worksheet.
    I then also need it to take the value from col c of the store data worksheet and put it into the corresponding store column in the tally worksheet (colj-colp).
    there is a formula in col I of the tally worksheet for the ret % figure.
    But my original workbook having 7 worksheets each named co1,co2,co4,co5,co6,co7,co8(all of will have the same layout of data)
    that will be used to combine onto the tally worksheet

    Note:

    I have attached two work sheet.One is working fine <<customer.xlsm>>.I have applied the same code for the workbook <<customer workbook_reval.xlsm>>.
    But am facing error while running macro.

    Please help me to reslove this issue

    Regards,
    Lax
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Facing error when applying macro for pivot table concepts

    Hi Laxmann

    In Customer workbook reval.xlsm workbook u have one empty header that's y your getting error see both file once again
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Facing error when applying macro for pivot table concepts

    Hi Laxmann

    In Customer workbook reval.xlsm workbook u have one empty header that's y your getting error see both file once again

    when your running macro from Col1 sheet its copying data from A1:O1 and for last column u have empty header name but whereas in Customer.xlsm file u have header name for last column.

    Run your macro till adding new sheet and copying header from Col1 Sheet to newly created sheet and paste value as Col1, Col2. then after stop macro compare your both file

  4. #4
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Facing error when applying macro for pivot table concepts

    Dear naveed,

    Thanks for the intrest to help..Am tried to..but am failing..But i want to run the macro in Customer Reval.xlsm only and this is my original file.Where i need to update the code and again again am failing when trying..Please help me boss


    Lax

  5. #5
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Facing error when applying macro for pivot table concepts

    Laxmann

    your both workbook header names to totally differ. plz check

  6. #6
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Facing error when applying macro for pivot table concepts

    Dear Naveed,

    I need to run the code for Customer reval workbook only.another one is a old workbook.If i want to run the code in Customer reval.xlsm means where i need to update the codes..

    lax

  7. #7
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Facing error when applying macro for pivot table concepts

    Laxmanann

    maximum code need to make changes.

    Need small clarification in customer workbook u have city column and u have taken that in pivot also whereas in customer reval workbook u dont have city column is it required that column

  8. #8
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Facing error when applying macro for pivot table concepts

    Dear naveed,

    We can skip that Ciy column.


    Thanks,
    lax

  9. #9
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Facing error when applying macro for pivot table concepts

    ok then based on your customer reval workbook i will make code to get output like customer wokrbook is it fine

    u will get file by tomorrow only.

  10. #10
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Facing error when applying macro for pivot table concepts

    Sure naveed..Thanks for the kind words.

  11. #11
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Facing error when applying macro for pivot table concepts

    Please find updated macro file

    Note: Please change PivotTableVersion12 to PivotTableVersion14
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Facing error when applying macro for pivot table concepts

    Dear naveed,

    Thanks for the help ..it is working good..But one ques pls

    What is the need of changing PivotTableVersion12 to PivotTableVersion14..I dint get your point..

    Thanks in advance
    Lax

  13. #13
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Facing error when applying macro for pivot table concepts

    Glad to help

    u have MS-Office 2010 and i have 2007 that version of 14 will not populate in my version of excel that's Y

    If your happy with the solution which provide please click on *Add Reputation to say and mark the thread as SOLVED

  14. #14
    Forum Contributor
    Join Date
    02-19-2014
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Facing error when applying macro for pivot table concepts

    Thanks boss..when i click add reputation star..it is showing msg like "You must spread some Reputation around before giving it to Naveed Raza again."..Please help me how to add.

    Lax

  15. #15
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Facing error when applying macro for pivot table concepts

    U have given enough reputation thats y.


    Its means before giving reputation to me u must give some reputation to others first then only u can able to give to me

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Applying Pivot table on multiple sheets
    By raed_237 in forum Excel General
    Replies: 0
    Last Post: 01-04-2010, 09:02 AM
  2. Applying filter to original data from pivot table
    By Oingofan in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 12-10-2009, 02:30 PM
  3. Applying a percentage formula to a Pivot Table
    By daveouch in forum Excel General
    Replies: 0
    Last Post: 10-14-2009, 11:37 AM
  4. Applying named ranges to Pivot table
    By RBI in forum Excel General
    Replies: 5
    Last Post: 10-07-2008, 01:28 PM
  5. Applying Formatting to Pivot Table
    By vijay_sankar in forum Excel General
    Replies: 1
    Last Post: 04-18-2007, 08:57 AM

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