Formula works for one row. But I need it to work with all ro

mfairbanks

New Member
Joined
Sep 12, 2002
Messages
17
I am using VBA to have some cells autofill if they are = No. I set it up, if cell A2 = No then cells B2 through F2 Value will = No.
How can I set this up to work on every row for each time the select No in column A is selected?

Here is the formula:
If Target.Address = "$A$2" Then

If LCase(Target.Value) = "no" Then
Range("$B$2:$F$2").Value = "No"
End If
End If
 
The security is medium. It prompts you to enable the macros. Which I click enable macros and assumed that it would work fine?
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
One person has Excel 97 and the other is on 2000. I am using Excel 2000. When I open VB on the one persons computer and select DeBug and compile it. It comes up with the error: Compile error - Can't find project or library. Then the reference window comes up.
 
Upvote 0
Perhaps they have a limited custom installation. I think the references dialog box tells you what's missing. You might need to update the installation from CD or whatever.
 
Upvote 0

Forum statistics

Threads
1,216,343
Messages
6,130,118
Members
449,558
Latest member
andyamcconnell

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