Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
killertofu
 
Posts: n/a
Default Help me simplify this function....


Help me simplify this function into something that I never have to write
again... Thanks, ahead of time...

HERE ARE THE CELLS:
A
1 DELL
2 GATEWAY
3 HEWLITT

HERE IS THE FORMULA FOR B1 THAT NEEDS STREAMLINING:
=IF(A1="DELL",1,IF(A1="GATEWAY",2,IF(A1="HEWLITT", 3,"NOTHING")))


--
killertofu
------------------------------------------------------------------------
killertofu's Profile: http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=512398

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Help me simplify this function....

If you can live with #N/A with no match

=MATCH(D1,{"DELL","GATEWAY","HEWLETT"},0)

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"killertofu" wrote
in message ...

Help me simplify this function into something that I never have to write
again... Thanks, ahead of time...

HERE ARE THE CELLS:
A
1 DELL
2 GATEWAY
3 HEWLITT

HERE IS THE FORMULA FOR B1 THAT NEEDS STREAMLINING:
=IF(A1="DELL",1,IF(A1="GATEWAY",2,IF(A1="HEWLITT", 3,"NOTHING")))


--
killertofu
------------------------------------------------------------------------
killertofu's Profile:

http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=512398



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
killertofu
 
Posts: n/a
Default Help me simplify this function....


Is there a way so that the MATCH function starts counting at zero? So
the first value in the array returns 00?


--
killertofu
------------------------------------------------------------------------
killertofu's Profile: http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=512398

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Help me simplify this function....

Subtract 1 from the match formula?

=MATCH(D1,{"DELL","GATEWAY","HEWLETT"},0)-1

killertofu wrote:

Is there a way so that the MATCH function starts counting at zero? So
the first value in the array returns 00?

--
killertofu
------------------------------------------------------------------------
killertofu's Profile: http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=512398


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Help me simplify this function....

Just subtract 1

=MATCH(D1,{"DELL","GATEWAY","HEWLETT"},0)-1


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"killertofu" wrote
in message ...

Is there a way so that the MATCH function starts counting at zero? So
the first value in the array returns 00?


--
killertofu
------------------------------------------------------------------------
killertofu's Profile:

http://www.excelforum.com/member.php...o&userid=31024
View this thread: http://www.excelforum.com/showthread...hreadid=512398





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default Help me simplify this function....

Bob Phillips wrote...
Just subtract 1

=MATCH(D1,{"DELL","GATEWAY","HEWLETT"},0)-1

....

And to return to the OP's original specs about returning "Nothing" for
no match,

=INDEX({0;1;2;"Nothing"},SEARCH(D1," Dell Gateway Hewlett
"&D1)/8)

or

=INDEX({0;1;2;"Nothing"},
MATCH(D1,{"Dell","Gateway","Hewlett",""}&LEFT(D1,{ 0,0,0,32767}),0))

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Beege
 
Posts: n/a
Default Help me simplify this function....

All,

The OP wanted to simplify so that they never had to write again. We need to
know a little more to help, here. What about the original formula causes a
re-write? I thought the original was fairly simple to begin with...

Beege


"Harlan Grove" wrote in message
ups.com...
Bob Phillips wrote...
Just subtract 1

=MATCH(D1,{"DELL","GATEWAY","HEWLETT"},0)-1

...

And to return to the OP's original specs about returning "Nothing" for
no match,

=INDEX({0;1;2;"Nothing"},SEARCH(D1," Dell Gateway Hewlett
"&D1)/8)

or

=INDEX({0;1;2;"Nothing"},
MATCH(D1,{"Dell","Gateway","Hewlett",""}&LEFT(D1,{ 0,0,0,32767}),0))



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"