Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Excel IF statement syntax issue

0

In a spreadsheetI am trying to modify I want to use the following formula, in cell R7 I have the formula =IF(G1=2,O7) What Iwant to do is change the value in G1 without  altering the value in R7 is this possible?

Post Edited
Title: Title was not descriptive.
Answer
Discuss

Answers

0
Selected Answer

The IF function consists of 3 parts as follows.

IF( [Condition], [Result if Tue], [Result if False] )

Your formula in R7 doesn't match this requirement. IF(G1=2,O7) only provides a result if the condition is True but none to be applied if G1 <> 2. Excel will insert the missing result and, simply, return "FALSE". This is probably upsetting you.

The solution to your problem is therefore in defining what you want R7 to show when G1<>2. Perhaps something like this?

=IF(G1=2,O7,"")
Discuss

Discussion

Thank you Variatas your solution has solved the problem
Ray 37 (rep: 2) Aug 2, '17 at 12:27 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login