Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Group,
I want to compare text objects, but upper case and lower case are messing it up. This is the code I have: Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" Set ThisCustomer = ActiveCell.Value Set ColACustomer = Range("A" & (ActiveCell.Row)).Value I want to set both ThisCustomer and ColACustomer to upercase then I will compare them. I believe I will have to use the application object, but am not sure? Thanks for your help. -- David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
since your two variables are typed as text, you don't use SET
Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" ThisCustomer = Ucase(ActiveCell.Value) ColACustomer = Ucase(Range("A" & ActiveCell.Row).Value( if ThisCustomer = ColaCustomer then -- Regards, Tom Ogilvy "David" wrote in message ... Hi Group, I want to compare text objects, but upper case and lower case are messing it up. This is the code I have: Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" Set ThisCustomer = ActiveCell.Value Set ColACustomer = Range("A" & (ActiveCell.Row)).Value I want to set both ThisCustomer and ColACustomer to upercase then I will compare them. I believe I will have to use the application object, but am not sure? Thanks for your help. -- David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom
-- David "Tom Ogilvy" wrote: since your two variables are typed as text, you don't use SET Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" ThisCustomer = Ucase(ActiveCell.Value) ColACustomer = Ucase(Range("A" & ActiveCell.Row).Value( if ThisCustomer = ColaCustomer then -- Regards, Tom Ogilvy "David" wrote in message ... Hi Group, I want to compare text objects, but upper case and lower case are messing it up. This is the code I have: Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" Set ThisCustomer = ActiveCell.Value Set ColACustomer = Range("A" & (ActiveCell.Row)).Value I want to set both ThisCustomer and ColACustomer to upercase then I will compare them. I believe I will have to use the application object, but am not sure? Thanks for your help. -- David |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
is the dim as text a userdefined item?
-- Gary "Tom Ogilvy" wrote in message ... since your two variables are typed as text, you don't use SET Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" ThisCustomer = Ucase(ActiveCell.Value) ColACustomer = Ucase(Range("A" & ActiveCell.Row).Value( if ThisCustomer = ColaCustomer then -- Regards, Tom Ogilvy "David" wrote in message ... Hi Group, I want to compare text objects, but upper case and lower case are messing it up. This is the code I have: Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" Set ThisCustomer = ActiveCell.Value Set ColACustomer = Range("A" & (ActiveCell.Row)).Value I want to set both ThisCustomer and ColACustomer to upercase then I will compare them. I believe I will have to use the application object, but am not sure? Thanks for your help. -- David |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My typo:
Dim ThisCustomer As String Dim ColACustomer As String -- Regards, Tom Ogilvy "Gary Keramidas" wrote in message ... is the dim as text a userdefined item? -- Gary "Tom Ogilvy" wrote in message ... since your two variables are typed as text, you don't use SET Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" ThisCustomer = Ucase(ActiveCell.Value) ColACustomer = Ucase(Range("A" & ActiveCell.Row).Value( if ThisCustomer = ColaCustomer then -- Regards, Tom Ogilvy "David" wrote in message ... Hi Group, I want to compare text objects, but upper case and lower case are messing it up. This is the code I have: Dim ThisCustomer As Text Dim ColACustomer As Text ActiveCell.Offset(1, 0).Range("A1").Select Do Until ActiveCell.Value = "" Set ThisCustomer = ActiveCell.Value Set ColACustomer = Range("A" & (ActiveCell.Row)).Value I want to set both ThisCustomer and ColACustomer to upercase then I will compare them. I believe I will have to use the application object, but am not sure? Thanks for your help. -- David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Upper Case Letters to First Letter Upper, Remaining Letters Lower | Excel Discussion (Misc queries) | |||
convert lower to upper case automatically without using UPPER | Excel Discussion (Misc queries) | |||
Changing upper case characters to upper/lower | Excel Discussion (Misc queries) | |||
How do I convert all upper case excel sheet into upper and lower . | Excel Discussion (Misc queries) | |||
How to change location A1 cell from upper right to upper left? | Excel Discussion (Misc queries) |