# adding an "if" condition to indirect

1. ## 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. ## Re: adding an "if" condition to indirect

is this what you mean? \$L\$12

like =IF(\$L\$12="","",SUM(INDIRECT("\$l\$12:l12")))

3. ## 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. ## 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")="",...)

5. ## 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. ## 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")))

7. ## 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. ## Re: adding an "if" condition to indirect

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

9. ## 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.

#### Thread Information

##### Users Browsing this Thread

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

#### 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