• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 71
  • Last Modified:

nested if

=If(Y1160=AB1160,Y1160),If(Y1160=AB1160,Y1160),AE1160

please help me out i need value a nested if

this have an error
0
Ernesto
Asked:
Ernesto
  • 5
  • 4
  • 2
2 Solutions
 
Wayne Taylor (webtubbs)Commented:
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
 
ErnestoAuthor Commented:
not the same
compare 3 diferent values
0
 
Wayne Taylor (webtubbs)Commented:
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
ErnestoAuthor Commented:
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
 
yo_beeDirector of Information TechnologyCommented:
@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
 
Wayne Taylor (webtubbs)Commented:
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
 
yo_beeDirector of Information TechnologyCommented:
Try this
=IF(AND(A12=B12,B12=C12,C12=D12),A12,FALSE)

Open in new window

0
 
ErnestoAuthor Commented:
wayne,
thats the idea but there are not consecutive values
how to achive
regards
0
 
Wayne Taylor (webtubbs)Commented:
In that case you will be best using edo60's method.
0
 
ErnestoAuthor Commented:
im gona copy them together
0
 
ErnestoAuthor Commented:
Tsm you experts!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 5
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now