Solved

Question about If Statment in Excel

Posted on 2014-10-25
4
153 Views
Last Modified: 2014-10-26
Is it possible to have an if statement in excel that will do the following and if so how would you write it?
I have column B and Column M.

I want the if statement to go down column B.
I want the if statement to do if possible to see if column M2 is 0 if it is to do the following in B2.
Copy B1 formula into B2 and if M2 is not 0 to use another formula.

When I say copy B1 formula into B2, I mean do not automatic change the column letters or numbers, others words if it days B1 = G1 + H1 I want it to stay B1 = G1 + H1 not B2 = G2 + H2
Because I want the outcome that was in B1 to be in B2. If this possible I will be taking the formula from B1 to B90

I hope this is clear enough.
0
Comment
Question by:starview
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 23

Accepted Solution

by:
Ejgil Hedegaard earned 300 total points
ID: 40404148
Use $ to lock the cell references when copying.
In B2: =IF(M2=0,$B$1,"another formula")
0
 
LVL 15

Assisted Solution

by:Haris Djulic
Haris Djulic earned 50 total points
ID: 40404265
If i understood correctly, if M(any row) is equal to 0 then copy the value from one row above, then this formula will work:

=IF(M2=0;INDIRECT("B"&ROW()-1);"another formula")

Open in new window


but if you always want to show the value from B1 then the Ejgil formula will do the trick..
0
 

Author Comment

by:starview
ID: 40404381
I am trying to use Ejgil formula
=IF(F15=0,$B$14,"=((16*B14)-((G15-F15)/(3500/16)))/16")
But when I put an amount into F15 it show wrong data. it looks like it is formatting that cell
I have to copy a blank cell back to F15
0
 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 150 total points
ID: 40404462
starview,

You're now referencing a difference column altogether (column F, cell F15) and you're on a different row (15 vs. 2).

You just need to remove the quotes in the [value_if_false] argument:
=IF(F15=0,$B$14,((16*B14)-((G15-F15)/(3500/16)))/16)

Regards,
-Glenn
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question