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!
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,300
Office Version
  1. 365
Platform
  1. Windows
LBall

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

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,136,786
Messages
5,677,724
Members
419,715
Latest member
Daniellovesxl

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
Top