+ Reply to Thread
Results 1 to 4 of 4

Error trying to define reference cell

  1. #1
    Registered User
    Join Date
    08-25-2016
    Location
    USA
    MS-Off Ver
    14.0.7172.5000 (32-bit)
    Posts
    96

    Error trying to define reference cell

    I'm getting an error with the following formula in cell AA14:

    =if(Y14<0,if(C(14+D14)<C14,2,1,""))

    I want excel to compare cell C59 and C14 (the value in D14
    is 45). What is the correct way besides C(14 + D14)?

    Thanks,
    Mark

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Error trying to define reference cell

    So the cell C59 depends on the value of D14, i.e. the row is obtained by the contents of D14 plus 14? If so, you need to do it like this:

    =if(Y14<0,if(INDIRECT("C"&(14+D14))<C14,2,1),"")

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    08-25-2016
    Location
    USA
    MS-Off Ver
    14.0.7172.5000 (32-bit)
    Posts
    96

    Re: Error trying to define reference cell

    Perfect. Thanks Pete!

    Mark

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Error trying to define reference cell

    You're welcome - thanks for the rep.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Pete

+ 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. [SOLVED] Getting compile error user-define type not define
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-07-2015, 07:22 AM
  2. Run-time error '1004': Application-define or object define error
    By patua in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-26-2014, 05:32 PM
  3. [SOLVED] VBA - Define Selection using cell reference
    By ormerods in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-07-2013, 09:35 AM
  4. Different sheet refernce using a formula to define the cell reference
    By tritty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2013, 11:16 PM
  5. [SOLVED] Use Cell Reference to Define Sum Ranges Across Different Sheets
    By jwhite0720 in forum Excel General
    Replies: 2
    Last Post: 06-29-2012, 11:34 AM
  6. error 1004 application define or object define
    By jay11 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-11-2011, 04:09 AM
  7. How to define a cell name and reference it in a differen sheet
    By shaunsul in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2011, 01:27 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