Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# nested if

Posted on 2016-11-01
Medium Priority
61 Views
=If(Y1160=AB1160,Y1160),If(Y1160=AB1160,Y1160),AE1160

please help me out i need value a nested if

this have an error
0
Question by:Ernesto
[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
• 5
• 4
• 2

LVL 47

Expert Comment

ID: 41869360
Both your conditions are the same, so you don't need a nested IF. This looks like it will suffice...

=IF(Y1160=AB1160, Y1160, AE1160)
0

Author Comment

ID: 41869363
not the same
compare 3 diferent values
0

LVL 47

Expert Comment

ID: 41869365
You'll need to describe what you want the formula to do then. What 3 values are to be compared? Your proto-formula is checking if Y1160=AB1160 twice.
0

Author Comment

ID: 41869368
ok

bajas    bajas   bajas  bajas      result          bajas

bajas altas   bajas  bajas      result            false

altas altas altas  altas       result    altas

altas bajas altas altas     result    false

Regards!!!
0

LVL 23

Expert Comment

ID: 41869369
@EDO
Your if statement is not correctly structured

Nested IF should be soothing like this:

``````=If(A1=<something>,If(B2=<something> else,"Both are true","A1 is true, but B2 is false"),"A1 is false so B2 has to be false)
``````
0

LVL 47

Accepted Solution

Wayne Taylor (webtubbs) earned 1000 total points
ID: 41869372
So comparing 4 values, not 3? And if all values are the same, return that value, otherwise return FALSE? You don't need a nested IF formula then. Use COUNTIF to check that all 4 are the same...

=IF(COUNTIF(A2:D2,A2)=4, A2)

See the attached workbook for an example.
COUNTIF.xlsx
0

LVL 23

Assisted Solution

yo_bee earned 1000 total points
ID: 41869374
Try this
``````=IF(AND(A12=B12,B12=C12,C12=D12),A12,FALSE)
``````
0

Author Comment

ID: 41869400
wayne,
thats the idea but there are not consecutive values
how to achive
regards
0

LVL 47

Expert Comment

ID: 41869402
In that case you will be best using edo60's method.
0

Author Comment

ID: 41869413
im gona copy them together
0

Author Closing Comment

ID: 41869478
Tsm you experts!
0

## Featured Post

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are â€¦
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, tâ€¦
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
###### Suggested Courses
Course of the Month5 days, 4 hours left to enroll

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

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