Disregard whether field has caps in it

Lball

Board Regular
Joined
Oct 4, 2005
Messages
197
Hello everyone,

How do i get my macro to NOT care if cell has caps in it while using an if statement. Here is a bit of my code:
Code:
If Cells(myRow, "H") = "IndyMac" Then
        With Range(Cells(myRow, 2), Cells(myRow, 10))
            .Copy Sheets("INDYMAC").Cells(Rows.Count, "B").End(xlUp).Offset(1)
            .Delete xlUp
        End With
Else........(Blah blah blah)

If my cell in (myRow, "H") has INDYMAC or indymac or Indymac, then the macro doesn't do what i want it to. Is there a way to tell the macro to just look at the letters instead of which letters are caps? Or do i have to add additional If statements for other possibilities?

Thanks in advance for any help!
 
LBall

The Option Compare Text goes at the top of the module not the sub.
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,214,827
Messages
6,121,806
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top