Solved

nested if

Posted on 2016-11-01
11
48 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:edo60
  • 5
  • 4
  • 2
11 Comments
 
LVL 47

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:edo60
ID: 41869363
not the same
compare 3 diferent values
0
 
LVL 47

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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:edo60
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 22

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 47

Accepted Solution

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

Assisted Solution

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

Open in new window

0
 

Author Comment

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

Expert Comment

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

Author Comment

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

Author Closing Comment

by:edo60
ID: 41869478
Tsm you experts!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

820 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