Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

nested if

Posted on 2016-11-01
11
Medium Priority
?
63 Views
Last Modified: 2016-11-01
=If(Y1160=AB1160,Y1160),If(Y1160=AB1160,Y1160),AE1160

please help me out i need value a nested if

this have an error
0
Comment
Question by:Ernesto
  • 5
  • 4
  • 2
11 Comments
 
LVL 48

Expert Comment

by:Wayne Taylor (webtubbs)
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

by:Ernesto
ID: 41869363
not the same
compare 3 diferent values
0
 
LVL 48

Expert Comment

by:Wayne Taylor (webtubbs)
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Ernesto
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 24

Expert Comment

by:yo_bee
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)

Open in new window

0
 
LVL 48

Accepted Solution

by:
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 24

Assisted Solution

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

Open in new window

0
 

Author Comment

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

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 41869402
In that case you will be best using edo60's method.
0
 

Author Comment

by:Ernesto
ID: 41869413
im gona copy them together
0
 

Author Closing Comment

by:Ernesto
ID: 41869478
Tsm you experts!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
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 …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

773 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