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
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,421
Messages
5,596,033
Members
414,039
Latest member
southike

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