+ Reply to Thread
Results 1 to 4 of 4

Defining a workbook, worksheet, with R1C1

  1. #1
    Registered User
    Join Date
    06-24-2015
    Location
    madrid
    MS-Off Ver
    2010
    Posts
    26

    Defining a workbook, worksheet, with R1C1

    hey guys !

    So, i have 2 questions, i am trying to paste the getpivotdata formula in a cell, but the formula is coming from another workbook, so i would like to know if there is a way to define them, to adapt them in the formula. I have put in bold what i would like you to automatize...
    Second question, i would like to know if it is possible to automatically change the number at the end of the formula, to adapt to each code in a range of cells, that i would look up for first, and then doing a loop until the end

    By advance, thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Defining a workbook, worksheet, with R1C1

    You would concatenate the variable values within the formula string.

    Something like this...
    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    06-24-2015
    Location
    madrid
    MS-Off Ver
    2010
    Posts
    26

    Re: Defining a workbook, worksheet, with R1C1

    Thank you very much, but i still obtain this error :

    Runtime error 1004
    application-defined of object-defined error :/. I don't understand, because when i go to the debugger, i point on the wbk2.fullname and sheet and it shows the good parameters... I precise that i did not change the cell.value part

  4. #4
    Registered User
    Join Date
    06-24-2015
    Location
    madrid
    MS-Off Ver
    2010
    Posts
    26

    Re: Defining a workbook, worksheet, with R1C1

    So, here is my new code :
    Please Login or Register  to view this content.
    Still got that "Runtime error 1004
    application-defined of object-defined error" :/ error, no one has an idea why ??

+ 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. Replies: 4
    Last Post: 03-10-2011, 06:31 PM
  2. Reference a cell in another workbook using R1C1
    By JonPugh in forum Excel General
    Replies: 3
    Last Post: 01-08-2010, 05:55 PM
  3. Converting workbook references to R1C1 style to insert into VBA code
    By RickCornelisse in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2009, 04:58 AM
  4. Defining Constants from info in workbook
    By Barb Reinhardt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2006, 01:45 PM
  5. Reference to worksheet range in R1C1
    By JohanF in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-25-2006, 08:15 PM

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