Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ralph Heidecke
 
Posts: n/a
Default Using Vlookup in a string search of a cell

I want to search a cell in a report where supervisors report staffing
actions. When overtime is worked they may note it as O/T, OT or ot. I was
wondering if it is possible to put these values in a table then use that
table to search the cell in the form something like

= IF(ISERROR(SEARCH(Vlookup(cell, table, reference),$C3,1)),FALSE,TRUE)

where C3 may contain something like "J Blow 800 - 400/ 400- 600 O/T"

to return true if one of the strings in the table is found or false if it is
not found.

Or is there a better way to do this?

thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default Using Vlookup in a string search of a cell

Ralph Heidecke wrote...
I want to search a cell in a report where supervisors report staffing
actions. When overtime is worked they may note it as O/T, OT or ot. I was
wondering if it is possible to put these values in a table then use that
table to search the cell in the form something like

=IF(ISERROR(SEARCH(Vlookup(cell, table, reference),$C3,1)),FALSE,TRUE)

where C3 may contain something like "J Blow 800 - 400/ 400- 600 O/T"

to return true if one of the strings in the table is found or false if it is
not found.

Or is there a better way to do this?


First, since you're using SEARCH, there's no difference between OT and
ot, so only 2 things to seek. The way you do that is to use an array
constant as the 1st argument to SEARCH,

SEARCH({"O/T","OT"},$C3)

That'll return a 2-entry array with each entry either #VALUE! if there
were no instances of the particular search string in the cell value or
a number if there were. Wrap the SEARCH call in a COUNT call, and COUNT
will return 0 if there were no instances of either search string or 0
if there were. So you can replace your formula above with

=COUNT(SEARCH({"O/T","OT"},$C3))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
What is a function in VBA EXCEL witch finds a string like "not" in cell and then deletes a row with this cell? [email protected] Excel Worksheet Functions 3 November 14th 05 01:48 AM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
Vlookup for data contained in a cell Garbunkel Excel Worksheet Functions 5 September 14th 05 06:47 PM
VLOOKUP using a cell calculated with NOW returns Error Chris Berding Excel Worksheet Functions 2 August 21st 05 03:22 AM
vlookup search for more then one answer Gemse Excel Discussion (Misc queries) 2 July 4th 05 01:24 PM


All times are GMT +1. The time now is 03:41 AM.

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"