Solved

Formula help

Posted on 2011-02-25
4
206 Views
Last Modified: 2012-05-11
Hello all, need help modifying this formula below, I need to add if they value returned is #value or an error, then value will be 7.

=TRIM(RIGHT(LEFT(Sheet4!A116,FIND("SM",Sheet4!A116)-1),LOOKUP(10^6,RIGHT(LEFT(Sheet4!A116,FIND("SM",Sheet4!A116)-1),{1,2,3,4,5,6})+0,{1,2,3,4,5,6})))
0
Comment
Question by:sandramac
  • 3
4 Comments
 
LVL 9

Accepted Solution

by:
McOz earned 500 total points
ID: 34982337
try:
=IFERROR(TRIM(RIGHT(LEFT(Sheet4!A116,FIND("SM",Sheet4!A116)-1),LOOKUP(10^6,RIGHT(LEFT(Sheet4!A116,FIND("SM",Sheet4!A116)-1),{1,2,3,4,5,6})+0,{1,2,3,4,5,6}))),7)

Open in new window

0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34982355
Is it OK if it's a text value (the 7)? If so try

=LOOKUP("zzz",IF({1,0},"7",TRIM(RIGHT(LEFT(Sheet4!A116,FIND("SM",Sheet4!A116)-1),LOOKUP(10^6,RIGHT(LEFT(Sheet4!A116,FIND("SM",Sheet4!A116)-1),{1,2,3,4,5,6})+0,{1,2,3,4,5,6})))))

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34982369
My solution assumes you have Excel 2003 or earlier - if you are using Excel 200 go with cOz's suggestion......

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34982380
Sorry garbled my reply above - I meant "If you are using Excel 2007 or later go with McOz's suggestion"

barry
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

861 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now