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

x
?
Solved

Excel Formula Help

Posted on 2011-02-24
6
Medium Priority
?
258 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

886 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