+ Reply to Thread
Results 1 to 10 of 10

Using Value of a Cell on a different sheet in .formula

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    munich, germany
    MS-Off Ver
    Excel 2010
    Posts
    4

    Using Value of a Cell on a different sheet in .formula

    Hello,

    I have a problem using a the value of a cell which is on a different worksheet, i.e the Worksheet "Results5".

    here is basically what i try to do

    Please Login or Register  to view this content.
    The error I get is:
    "Application defined or object defined error"

    What am I doing wrong?

    Thank you very much for your help

    Max
    Last edited by FDibbins; 10-22-2012 at 01:23 PM. Reason: added code tags

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Using Value of a Cell on a different sheet in .formula

    How about
    Please Login or Register  to view this content.
    Or, without looping
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    munich, germany
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Using Value of a Cell on a different sheet in .formula

    thanks for your reply
    unfortunately the first option doesn't work, excel is asking me for an input
    also i need to do it in a loop as in my program i am writing first the values in column 3 and than placing it in the formula and finally solving
    it with the solver.

    Any other ideas?

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Using Value of a Cell on a different sheet in .formula

    Hi mikerickson

    Looking at the OP's formula should you not include "case_n" in your formula?

    Hi maxifisher when adding code one should wrap it or the moderators will get upset.

    Alf

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Using Value of a Cell on a different sheet in .formula

    maxi...
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    i have done it for you this time, but please remember in future
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    10-10-2012
    Location
    munich, germany
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Using Value of a Cell on a different sheet in .formula

    @ Fdibbins: Thanks I am very new to the Forum so I didn't know.

    @ Alf: I tried to include case_n. I am trying to copy a value from the Sheet Input5 to Results5 into a formula. Could you please explain further what you mean?

    Thanks a lot

    Max

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Using Value of a Cell on a different sheet in .formula

    @ maxifischer: Looking at your code you are as you say trying to copy a value from sheet "Input5" whereas the code from mikerickson to me looks like it copies a value from a sheet named just "Input"

    Alf

  8. #8
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Using Value of a Cell on a different sheet in .formula

    Yes, I missed that
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-10-2012
    Location
    munich, germany
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Using Value of a Cell on a different sheet in .formula

    Thanks a lot! This works perfectly fine.

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Using Value of a Cell on a different sheet in .formula

    @ maxifischer

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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