Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default Return value using partial value of a cell.

Can anyone tell me how to use some logic to return a value from a partial
cell reference? Here is what I have tried, as you can guess they didnt work.
Is there a wild card that could be put before and after in the formula? (That
is what the % was all about in my first attempt.) note column B is where i am
trying to return the value from the formula.

=if(a1=%her%,€¯her€¯,0) I also tried€¦ =if(a1=€¯her€¯,€¯her€¯,0)
A B
1 t-shirt small her black her
2 t-shirt med him black
3 t-shirt med her black her

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Return value using partial value of a cell.

On 8 mar, 23:03, Shaun wrote:
Can anyone tell me how to use some logic to return a value from a partial
cell reference? Here is what I have tried, as you can guess they didn’t work.
Is there a wild card that could be put before and after in the formula? (That
is what the % was all about in my first attempt.) note column B is where i am
trying to return the value from the formula.

=if(a1=%her%,”her”,0) *I also tried… *=if(a1=”her”,”her”,0)
* * * * A * * * * * * * * * * * B
1 * * * t-shirt small her black * * * * her
2 * * * t-shirt med him black *
3 * * * t-shirt med her black * * * * * her


Good evening

You can try the Excel FIND function like this
IF(ISERROR(FIND("her";A1;1));0;"her")
The FIND function returns an Error (#VALUE!) if the substring "her" is
not found.

Regards


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Return value using partial value of a cell.

In Excel, the wild card is *, not %. * will match any number of characters.
A single character is ?.

However, the If function does not support wild cards. But other functions
like Countif do. So try:
=if(countif(a1,"*her*")0,"her",0)

I'm also willing to bet you'd be happier with a blank cell than zero, if so,
use:
=if(countif(a1,"*her*")0,"her","")

Regards,
Fred

"Shaun" wrote in message
...
Can anyone tell me how to use some logic to return a value from a partial
cell reference? Here is what I have tried, as you can guess they didnt
work.
Is there a wild card that could be put before and after in the formula?
(That
is what the % was all about in my first attempt.) note column B is where i
am
trying to return the value from the formula.

=if(a1=%her%,€¯her€¯,0) I also tried€¦ =if(a1=€¯her€¯,€¯her€¯,0)
A B
1 t-shirt small her black her
2 t-shirt med him black
3 t-shirt med her black her


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
Extracting partial information from a cell Jode Excel Discussion (Misc queries) 2 October 8th 09 01:51 AM
Partial cell protection? Anglepoise Excel Discussion (Misc queries) 1 August 3rd 09 12:51 PM
Validation of partial data in a cell. Chris Excel Discussion (Misc queries) 2 August 8th 08 06:49 PM
return partial string alex Excel Worksheet Functions 5 July 20th 07 11:41 AM
Shade partial cell LJob Excel Discussion (Misc queries) 1 September 25th 06 03:01 PM


All times are GMT +1. The time now is 11:55 PM.

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

About Us

"It's about Microsoft Excel"