Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2015, 11:03 AM
MaineLady MaineLady is offline find a set of characters in a string and return a 0 (zero) if not found Windows 7 32bit find a set of characters in a string and return a 0 (zero) if not found Office 2013
Advanced Beginner
find a set of characters in a string and return a 0 (zero) if not found
 
Join Date: Sep 2014
Posts: 52
MaineLady is on a distinguished road
Default find a set of characters in a string and return a 0 (zero) if not found

I am trying to look for a set of characters in a cell. If the characters are found, enter "CB" in the cell and return a 0 (zero) if the characters are not found.



In a separate column, I entered the formula:

=IF(FIND("CACIWC",G4,1)>0,"CB",0)

With the above formula, if the characters are found it works... if they're not found in end up with #VALUE!

What am I doing wrong?
Reply With Quote
  #2  
Old 11-05-2015, 11:28 AM
Kevin@Radstock Kevin@Radstock is offline find a set of characters in a string and return a 0 (zero) if not found Windows 8 find a set of characters in a string and return a 0 (zero) if not found Office 2013
Office 365
 
Join Date: Feb 2012
Posts: 94
Kevin@Radstock is on a distinguished road
Default

Hi

Try the following:

=IF(ISNUMBER(SEARCH("CACIWC",G4)),"CB",0)

Kevin
Reply With Quote
  #3  
Old 11-05-2015, 03:23 PM
MaineLady MaineLady is offline find a set of characters in a string and return a 0 (zero) if not found Windows 7 32bit find a set of characters in a string and return a 0 (zero) if not found Office 2013
Advanced Beginner
find a set of characters in a string and return a 0 (zero) if not found
 
Join Date: Sep 2014
Posts: 52
MaineLady is on a distinguished road
Default Thank You

Thank you, Kevin... That did the trick.

Last edited by Pecoflyer; 11-06-2015 at 12:14 AM. Reason: Remove unnecessary quote
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
find a set of characters in a string and return a 0 (zero) if not found search for string, wherever found, at end of line, insert 8 <cr>s sbktex Word VBA 2 09-17-2014 04:09 PM
find a set of characters in a string and return a 0 (zero) if not found How to get the Right function to return a string that has UPPERCASE letters only adj Word VBA 9 08-30-2014 09:21 PM
find a set of characters in a string and return a 0 (zero) if not found Retrieve characters after nth occurence of a string veedee Excel 5 06-16-2014 03:41 PM
find a set of characters in a string and return a 0 (zero) if not found Macro to create new word doc and save the file using String found in the document VBNation Word VBA 2 02-08-2013 07:14 AM
find a set of characters in a string and return a 0 (zero) if not found Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft