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

x
?
Solved

Excel Formula Help

Posted on 2011-02-24
6
Medium Priority
?
257 Views
Last Modified: 2012-05-11
Hello I have this formula listed below, it analyzes J5 to M5 to find a common value, but I discovered an error, here is the data this time listed below, the formula should return a -TSRA but it did not. any help would be greatly appreciated.

J5            K5             L5             M5
+TSRA      -TSRA      -TSRA      

=IFERROR(SUBSTITUTE(SUBSTITUTE(INDEX(J5:M5,MODE(MATCH(SUBSTITUTE(SUBSTITUTE(J5:M5,"-",""),"+",""),SUBSTITUTE(SUBSTITUTE(J5:M5,"-",""),"+",""),0))),"-",""),"+",""),M5)
0
Comment
Question by:sandramac
[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
  • 3
  • 2
6 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 34975819
Hello sandramac, that looks like one of mine.....

It needs to be confirmed with CTRL+SHIFT+ENTER and then it should return the value TSRA (it ignores + and minus signs....) what does it return, what do you expect?

regards, barry
0
 

Author Comment

by:sandramac
ID: 34975846
Hi barry, the CTR-SHFT-ENTER worked, had a brain lapse on it.  but on one instance it wont return the right data when the following is present:

J5                K5                 L5                  M5
                  TSRA            -TSRA                                                           it should return -TSRA or TSRA, but it gives me                                                  a blank...
0
 
LVL 50
ID: 34975849
Hello,

the way the formula is set up, it will never return a + or a - since these are substituted with "".

Can you explain what you want to achieve? Maybe there's a different approach.

cheers, teylyn
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 34975875
OK, yes, I can see that - that's because there are 2 blanks so it's actually taking a blank as the modal value (because the blank comes first, too), so you can prevent it considering blanks with a small tweak

=IFERROR(SUBSTITUTE(SUBSTITUTE(INDEX(J5:M5,MODE(IF(J5:M5<>"",MATCH(SUBSTITUTE(SUBSTITUTE(J5:M5,"-",""),"+",""),SUBSTITUTE(SUBSTITUTE(J5:M5,"-",""),"+",""),0)))),"-",""),"+",""),M5)

still confirmed with CTRL+SHIFT+ENTER

regards, barry
0
 

Author Comment

by:sandramac
ID: 34975886
Hello I have results from 4 different sheets that are displayed in J5 to M5  if there are two or more of the same value, ignoring any + or - signs then the return result will be that matching result with a + sign if there is one or a - sign if there is one, if both exist then use the + sign here are some examples below

J5              K5                 L5                M5
RA            +RA              -RA                              return +RA
SHRA      -SHRA           -SHRA                          return -SHRA
SN           +SN               SN                                 return SN
TSRA        -TSRA                                               return -TSRA
0
 

Author Comment

by:sandramac
ID: 34975891
barry,

that did the trick.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

715 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