Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for searching for a text string
I have a table where each cell contains a string of various alphanumeric
codes. For example: KB / S596-19 RM / S243-59 VB / I1997-1 KB / GEN SV / GEN I want to write a formula to count 1 if the cell is populated (not all cells are), but count 0 if the cell contains 'GEN'. I've tried this: =IF(AND(B4<"",B4<"*GEN*"),1,0) But the "*GEN*" portion of this formula does not work. Any suggestions? KellyB |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for searching for a text string
Try something like this:
=IF(ISBLANK(A1),0,IF(TRUE(FIND("GEN",A1)),0,1)) Dave -- Brevity is the soul of wit. "KellyB" wrote: I have a table where each cell contains a string of various alphanumeric codes. For example: KB / S596-19 RM / S243-59 VB / I1997-1 KB / GEN SV / GEN I want to write a formula to count 1 if the cell is populated (not all cells are), but count 0 if the cell contains 'GEN'. I've tried this: =IF(AND(B4<"",B4<"*GEN*"),1,0) But the "*GEN*" portion of this formula does not work. Any suggestions? KellyB |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for searching for a text string
assumes gen is at the end??
helper column =IF(AND(E2<"",RIGHT(E2,3)<"gen"),1,0) without helper column =SUMPRODUCT((LEN(E2:E22)2)*(RIGHT(E2:E22,3)<"gen ")) -- Don Guillett SalesAid Software "KellyB" wrote in message ... I have a table where each cell contains a string of various alphanumeric codes. For example: KB / S596-19 RM / S243-59 VB / I1997-1 KB / GEN SV / GEN I want to write a formula to count 1 if the cell is populated (not all cells are), but count 0 if the cell contains 'GEN'. I've tried this: =IF(AND(B4<"",B4<"*GEN*"),1,0) But the "*GEN*" portion of this formula does not work. Any suggestions? KellyB |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for searching for a text string
Sorry, do this: =IF(ISBLANK(A49),0,IF(NOT(FIND("gen",A49)),0,1))
Dave -- Brevity is the soul of wit. "Dave F" wrote: Try something like this: =IF(ISBLANK(A1),0,IF(TRUE(FIND("GEN",A1)),0,1)) Dave -- Brevity is the soul of wit. "KellyB" wrote: I have a table where each cell contains a string of various alphanumeric codes. For example: KB / S596-19 RM / S243-59 VB / I1997-1 KB / GEN SV / GEN I want to write a formula to count 1 if the cell is populated (not all cells are), but count 0 if the cell contains 'GEN'. I've tried this: =IF(AND(B4<"",B4<"*GEN*"),1,0) But the "*GEN*" portion of this formula does not work. Any suggestions? KellyB |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for searching for a text string
Tried that, but it didn't like it when FIND("GEN",A1) returned #VALUE, i.e.
when the cell did not contain GEN. "Dave F" wrote: Try something like this: =IF(ISBLANK(A1),0,IF(TRUE(FIND("GEN",A1)),0,1)) Dave -- Brevity is the soul of wit. "KellyB" wrote: I have a table where each cell contains a string of various alphanumeric codes. For example: KB / S596-19 RM / S243-59 VB / I1997-1 KB / GEN SV / GEN I want to write a formula to count 1 if the cell is populated (not all cells are), but count 0 if the cell contains 'GEN'. I've tried this: =IF(AND(B4<"",B4<"*GEN*"),1,0) But the "*GEN*" portion of this formula does not work. Any suggestions? KellyB |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula for searching for a text string
See my response to my post. My original suggestion was incorrect.
-- Brevity is the soul of wit. "KellyB" wrote: Tried that, but it didn't like it when FIND("GEN",A1) returned #VALUE, i.e. when the cell did not contain GEN. "Dave F" wrote: Try something like this: =IF(ISBLANK(A1),0,IF(TRUE(FIND("GEN",A1)),0,1)) Dave -- Brevity is the soul of wit. "KellyB" wrote: I have a table where each cell contains a string of various alphanumeric codes. For example: KB / S596-19 RM / S243-59 VB / I1997-1 KB / GEN SV / GEN I want to write a formula to count 1 if the cell is populated (not all cells are), but count 0 if the cell contains 'GEN'. I've tried this: =IF(AND(B4<"",B4<"*GEN*"),1,0) But the "*GEN*" portion of this formula does not work. Any suggestions? KellyB |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumproduct issues | Excel Worksheet Functions | |||
Return a text string when the result of VLOOKUP formula is #N/A | Excel Worksheet Functions | |||
find text in a string formula | Excel Worksheet Functions | |||
Return a formula as text string to a cell | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions |