Solved

Question about If Statment in Excel

Posted on 2014-10-25
4
140 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
4 Comments
 
LVL 21

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now