+ Reply to Thread
Results 1 to 9 of 9

adding an "if" condition to indirect

  1. #1
    Forum Contributor
    Join Date
    05-22-2007
    Location
    Laguna Beach, CA
    Posts
    140

    adding an "if" condition to indirect

    I've recently added the IF(L12="","", part to my formula but if I move the contents in L12 the formula changes to the new location of L12.

    How do I add "indirect" to the added part of the formula...so L12 stays put?

    Thanks.

    Bruce

    formula: =IF(L12="","",SUM(INDIRECT("$l$12:l12")))

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    Office 365 ProPlus - work; 2012 for Mac at home
    Posts
    6,931

    Re: adding an "if" condition to indirect

    is this what you mean? $L$12

    like =IF($L$12="","",SUM(INDIRECT("$l$12:l12")))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor
    Join Date
    05-22-2007
    Location
    Laguna Beach, CA
    Posts
    140

    Re: adding an "if" condition to indirect

    I tried adding the "$L$12" but if I move L12 to another location (say L7) the formula changes to L7.

    note: the formula is located in P12.

    I'm trying to have the formula in P12 always look at L12, even if I move L12.

    When I first created the formula I had the same problem but after some help (from this forum) the "indirect" was added and that solved the moving issue.

    Suggestions.

    Bruce

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    12,650

    Re: adding an "if" condition to indirect

    It seems like it should simply be to put the L12 reference text into another INDIRECT() function =IF(INDIRECT("L12")="",...)
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Contributor
    Join Date
    05-22-2007
    Location
    Laguna Beach, CA
    Posts
    140

    Re: adding an "if" condition to indirect

    I would think it would be a simple fix but I've tried everything I know of and I still can't get it to work.

    Any additional suggestions?

    Bruce

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,117

    Re: adding an "if" condition to indirect

    Why would you "move" L12
    Put "L12" in some cell (e.g. Z1)

    Then
    =IF(INDIRECT(Z1)="","",SUM(INDIRECT("$l$12:l12")))
    Ben Van Johnson

  7. #7
    Forum Contributor
    Join Date
    05-22-2007
    Location
    Laguna Beach, CA
    Posts
    140

    Re: adding an "if" condition to indirect

    I used your formula (substituting L12 for Z1) and it still doesn't work.

    I'll work on it in the morning.

    Thanks.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,117

    Re: adding an "if" condition to indirect

    It does work. There is something else wrong...
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    05-22-2007
    Location
    Laguna Beach, CA
    Posts
    140

    Re: adding an "if" condition to indirect

    Sorry for the late response.

    The formula worked once I stopped over thinking it.

    Thanks everyone for all your help.

+ 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. "Add Row" and "Remove Row" Buttons... adding rows with formulas down filled
    By excelatnothing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2015, 02:44 AM
  2. Adding a "between condition" after a countifs
    By amphinomos in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2014, 10:01 AM
  3. [SOLVED] Adding a "not to exceed" condition to existing formula
    By RandomRed in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2014, 10:55 AM
  4. Adding multiple "find" with "left" /"Right"
    By Daniel1 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 02-22-2014, 04:33 PM
  5. Indirect, Match, Address adding {} and "" when inbedded in Formula
    By Alex.riccio in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-13-2014, 09:18 AM
  6. Replies: 0
    Last Post: 09-17-2012, 01:17 PM
  7. Replies: 4
    Last Post: 10-29-2009, 12:08 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