MrExcel Message Board


Go Back   MrExcel Message Board > The Lounge > Lounge v.2.0

Lounge v.2.0 A place to chat.

Reply
 
Thread Tools Display Modes
Old Sep 10th, 2008, 12:57 AM   #1
pma
 
Join Date: Sep 2006
Posts: 1
Default Re: June/July 2008 Challenge of the Month

I pasted =LOOKUP(2^15,SEARCH(D$2:D$10,A2),E$2:E$10) into b2:b25. I then entered a different phrase including one of the colors into a26. When I hit enter the formula from b25 was copied down to b26, which was blank, automatically. I don't see any macros at work. What's going on here?
pma is offline   Reply With Quote
Old Sep 10th, 2008, 01:27 AM   #2
barry houdini
MrExcel MVP
 
Join Date: Mar 2005
Location: England
Posts: 13,900
Default Re: June/July 2008 Challenge of the Month

Hello pma, welcome to MrExcel.

This is an Excel feature (certainly in 2003), see this from Excel [2003] Help. See red highlighted section

Extend formats and formulas to additional rows
By default, Microsoft Excel automatically formats new data that you type at the end of a range to match the preceding rows. Excel also automatically copies formulas that have been repeated in the preceding rows and extends them to additional rows.
Note In order to be extended to new rows in the range, the formats and formulas must appear in at least three of the five preceding rows.
You can turn this option off (or back on again) at any time:
  1. On the Tools menu, click Options.
  2. On the Edit tab, clear the Extend data range formats and formulas check box to turn automatic formatting off. To turn automatic formatting back on again, select the Extend data range formats and formulas check box.
****** content=03/24/2005 name=MajorRevDate>****** content=08/15/2003 name=CreationDate>
barry houdini is offline   Reply With Quote
Old Oct 24th, 2008, 04:52 PM   #3
davejago
 
Join Date: Apr 2005
Location: Washington, DC
Posts: 123
Default Re: June/July 2008 Challenge of the Month

Quote:
Originally Posted by barry houdini View Post
Here's one possibility.....

=LOOKUP(2^15,SEARCH(D$2:D$10,A2),E$2:E$10)
Can someone help me to break this formula out in layman's terms for me? I'm an intermediate excel user, but I don't understand how this is working.
davejago is offline   Reply With Quote
Old Oct 24th, 2008, 05:41 PM   #4
EugeneCarter
 
Join Date: Jul 2008
Posts: 75
Default Re: June/July 2008 Challenge of the Month

Quote:
Originally Posted by davejago View Post
Can someone help me to break this formula out in layman's terms for me? I'm an intermediate excel user, but I don't understand how this is working.
Check out the posts from around Jun 17th, 2008 and the links within them. There were many posts on Barry's solution.
EugeneCarter is offline   Reply With Quote
Old Mar 11th, 2009, 11:50 AM   #5
Mr excel novice
 
Join Date: Mar 2009
Posts: 0
Thumbs up Re: June/July 2008 Challenge of the Month

Quote:
Originally Posted by barry houdini View Post
Here's one possibility.....

=LOOKUP(2^15,SEARCH(D$2:D$10,A2),E$2:E$10)
Genius , but
-forgot one thing!
the challenge was for additional list items to be added without alteration to the function - keep your original with:

=LOOKUP(2^15,SEARCH(Keyword,A2),Assign)
where the defined names are:
Keyword =OFFSET(Sheet1!$D$1,1,0,(COUNTA(Sheet1!$D:$D)-1))
&
Assign =OFFSET(Sheet1!$E$1,1,0,(COUNTA(Sheet1!$E:$E))-1))
Mr excel novice is offline   Reply With Quote
Old Mar 11th, 2009, 12:40 PM   #6
Mr excel novice
 
Join Date: Mar 2009
Posts: 0
Default Re: June/July 2008 Challenge of the Month

Quote:
Originally Posted by Mr excel novice View Post
Genius , but
-forgot one thing!
the challenge was for additional list items to be added without alteration to the function - keep your original with:

=LOOKUP(2^15,SEARCH(Keyword,A2),Assign)
where the defined names are:
Keyword =OFFSET(Sheet1!$D$1,1,0,(COUNTA(Sheet1!$D:$D)-1))
&
Assign =OFFSET(Sheet1!$E$1,1,0,(COUNTA(Sheet1!$E:$E))-1))
Sorry!
just noticed that this was covered before.
You could also change the 2^15 to COUNTA(Phrases), with dynamic range but this won't make the function any different.
Mr excel novice is offline   Reply With Quote
Old Jul 2nd, 2009, 11:03 AM   #7
maheshmaxi
 
maheshmaxi's Avatar
 
Join Date: Dec 2008
Location: Chennai, IND
Posts: 105
Default Re: June/July 2008 Challenge of the Month

Quote:
Originally Posted by barry houdini View Post
Here's one possibility.....

=LOOKUP(2^15,SEARCH(D$2:D$10,A2),E$2:E$10)
This is an excellent formula... Great Barry It helps me a lot...
__________________
......<E>
R K Ma<x>X
............<C>
...............<E>
..................<L>
maheshmaxi is offline   Reply With Quote
Old Jun 17th, 2008, 05:40 PM   #8
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 39,499
Default Re: June/July 2008 Challenge of the Month

You'd need to invoke a formula of the type as in:

http://www.mrexcel.com/forum/showthread.php?t=321942

http://www.mrexcel.com/forum/showthread.php?t=323188


Applied to the problem/task at hand...

Code:
=LOOKUP(9.99999999999999E+307,
    SEARCH(" "&$D$2:$D$10&" "," "&A2&" "),
    $E$2:$E$10)
On Excel 2003 and beyond, convert D2:E10 into a list (Data|List|CreateList).

On earlier version, we would need define dynamic named ranges, say, KEYS and SLOTS, and invoke:

Code:
=LOOKUP(9.99999999999999E+307,
    SEARCH(" "&KEYS&" "," "&A2&" "),
    SLOTS)
Quote:
Originally Posted by MrExcel View Post
I've posted a new challenge of the month today. Like the last challenge, this one will have many different approaches. Post your entries here. While the ultimate "best" entry wins the LiveLessons DVD, several podcast DVD's are available to anyone who proposes a significant advancement towards a cool solution.

Entries are due by 15 July 2008.

Bill Jelen
Aladin Akyurek is offline   Reply With Quote
Old Jun 17th, 2008, 05:56 PM   #9
schielrn
 
schielrn's Avatar
 
Join Date: Apr 2007
Location: Cincinnati, Ohio
Posts: 5,337
Default Re: June/July 2008 Challenge of the Month

Aladin,

I could only get your formula to work for the phrases that did not end with the color. The only way I could get it to work in all cases if the phrase ends with the color was by removing the &" "

=LOOKUP(9.99999999999999E+307,SEARCH(" "&$D$2:$D$10," "&A2),$E$2:$E$10)
__________________
Always make a back up copy before trying new code, you never know what you might lose!
schielrn is offline   Reply With Quote
Old Jun 17th, 2008, 06:01 PM   #10
cornflakegirl
 
cornflakegirl's Avatar
 
Join Date: Nov 2004
Location: UK
Posts: 1,743
Default Re: June/July 2008 Challenge of the Month

schielrn - there is a string of ascii characters at the end of each cell - a bunch of 160s (not sure what this is) ending with a 32 (space). i think mr excel is messing with our minds!

removing the &" " will mean that "redditch" becomes a problem again...
__________________
Emma

Your apparent nonchalance belies the fact that you can only think of me.
cornflakegirl is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 08:20 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.