Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
I am using this script but it can only read text with small letters. Can I change it to read with both small and big letters: Case Is = "i13" If LCase(.Value) = LCase("select door") Then 'skipit End If |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Calle,
Using LCase on both sides of the comparison expression reders the test case insensitive and, consequently, your code should accept the sought text in any casr, or mix of cases. --- Regards, Norman "Calle" wrote in message ... Hi! I am using this script but it can only read text with small letters. Can I change it to read with both small and big letters: Case Is = "i13" If LCase(.Value) = LCase("select door") Then 'skipit End If |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok, thx I try that. one more question. Is ther a way to get a script to
delete content in merged cells. I can only get the script to delete in normal cells. script: Case Is = "i17" If LCase(.Value) = LCase("clear") Then Selection.Offset(1, -2).ClearContents Else |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Calle,
Try: Case Is = "i17" If LCase(.Value) = LCase("clear") Then With Selection.Offset(1, -2) If .MergeCells Then .MergeArea.ClearContents Else .ClearContents End If End With Else --- Regards, Norman "Calle" wrote in message ... ok, thx I try that. one more question. Is ther a way to get a script to delete content in merged cells. I can only get the script to delete in normal cells. script: Case Is = "i17" If LCase(.Value) = LCase("clear") Then Selection.Offset(1, -2).ClearContents Else |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thx for the reply ! :)
|
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Selection.Offset(1, -2).value = "" Calle wrote: ok, thx I try that. one more question. Is ther a way to get a script to delete content in merged cells. I can only get the script to delete in normal cells. script: Case Is = "i17" If LCase(.Value) = LCase("clear") Then Selection.Offset(1, -2).ClearContents Else -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave,
A much simpler answer! I never use merged cells - and it shows! --- Regards, Norman "Dave Peterson" wrote in message ... One way: Selection.Offset(1, -2).value = "" |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would think that this would work, too:
Selection.Offset(1, -2).MergeArea.ClearContents even if the range isn't merged. (untested, though) Norman Jones wrote: Hi Dave, A much simpler answer! I never use merged cells - and it shows! --- Regards, Norman "Dave Peterson" wrote in message ... One way: Selection.Offset(1, -2).value = "" -- Dave Peterson |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you put
Option Compare Text at the very top of your module, text comparisons are automatically done case-insensitive, so there is no need for the conversion to LCase. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Calle" wrote in message ... Hi! I am using this script but it can only read text with small letters. Can I change it to read with both small and big letters: Case Is = "i13" If LCase(.Value) = LCase("select door") Then 'skipit End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Anyone know of a way, or have a script, to read a TOC from CD's? | Excel Programming | |||
Read only password script box | Excel Discussion (Misc queries) | |||
Get…UCase or LCase ??? | Excel Programming | |||
Get…UCase or LCase ??? | Excel Programming |