Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 06-01-2011, 01:57 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline if (text) then [value1, value2,,[ Windows 7 32bit if (text) then [value1, value2,,[ Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Sure,

If you put the list of colours, say red, blue and orange into cells J1:J3, two options would be:

(1) Use the same formula as above, but with the array constant replaced by the range and enter it as an array formula. To do this, when you type the formula into the formula bar, finish the entry with CTRL+SHIFT+ENTER instead of just ENTER. If done correctly then Excel will automatically surround the formula with braces { } (you can't manually enter these yourself).
Code:
{=IF(OR(ISNUMBER(SEARCH(J1:J3,A1))),B1,0)}
(2)
Use a variation such as this one (which can be entered as a normal formula).
Code:
=IF(SUMPRODUCT(--ISNUMBER(SEARCH(J1:J3,A1))),B1,0)
Reply With Quote
 

Tags
if-then, text dependency



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to find text in between two characters and then format selected text? qcom Word 5 02-19-2015 11:23 PM
if (text) then [value1, value2,,[ Need help on Macro 03- Find text - if text is blank then remove line simpleonline1234 Word VBA 1 02-25-2011 02:28 AM
Objective: Automatically export email text,attachment text to DB friendly format SilentLee Outlook 0 11-14-2010 02:45 PM
Templates: automatic text generation from Rich Text content control Chickenmunga Word 0 10-01-2008 11:16 AM
Cells with wrap text not showing text lazylew Excel 1 08-31-2008 06:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:57 AM.


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