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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

ryan_law2000

Well-known Member
Joined
Oct 2, 2007
Messages
738
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?
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Perhaps

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

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,943
Messages
5,856,438
Members
431,814
Latest member
qualitypavingstone

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