Worksheet Change Help

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hello,

I have this:
Code:
If Len(Target.Value) > 3 And Len(Target.Value) < 31 Then
, I am trying to see if I can go from requiring an entry length to requiring a certain entry. such as "Blue Moon" basically once that phrase is entered, then my code will execute.

thanks,

Andrew
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
You just need;

Code:
If Target.Value="Blue Moon" Then

but this would run if you typed it anywhere on the sheet. Personally I would restrict it to a location or range and test the value e.g.

Code:
If Target.Address = "$A$1" and Target.Value= "Blue Moon" Then
or
Code:
If Target.Column= 1 and Target.Value= "Blue Moon" Then 'for column A
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

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