conditional formatting

ryan_law2000

Well-known Member
Joined
Oct 2, 2007
Messages
738
Ok so i have a userform that pastes informtaion into specific cells.

Userform code:
ActiveCell.Offset(0, 25) = DimensionData.TextBox25

That cell is Z4 on the worksheet
conditional formating:
cell =$Z4>1 then turn =$B$4:$AA$1000 Green.

Then problem is even when NO information is entered in the userform all the cells turn green (as if its entering a phantom number)

If I go to Z4 (blank cell at this point) and press delete then cells turn back to normal fill

How can I make this NOT paste a phantom number so the conditional formatting will work properly

Thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I guess what Im thinking is in the userform

ActiveCell.Offset(0, 25) = DimensionData.TextBox25

But somehow add

If Textbox25 is blank then do not paste info


some kinda code like that might work?
 
Upvote 0
Perhaps

Code:
If DimensionData.TextBox25.Text <> "" Then ActiveCell.Offset(0, 25) = DimensionData.TextBox25.Text
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,812
Members
452,945
Latest member
Bib195

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