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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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,214,943
Messages
6,122,370
Members
449,080
Latest member
Armadillos

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