Add a space to list validation

huutri

New Member
Joined
Jun 16, 2011
Messages
12
Hi All

I have problem about list datavalidation: I want to add a space in first row of list validation, I try use chr(32) but it doesn't show any space. Can i help you add a space to first row in list datavalidation? Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi All

I have problem about list datavalidation: I want to add a space in first row of list validation, I try use chr(32) but it doesn't show any space. Can i help you add a space to first row in list datavalidation? Thanks

make the DV list refer to a range whose the first cell is blank .
 
Upvote 0
Thank you for your answer
But in DV list i get data from multi ranges, and i want to add empty row at the first row of list. I try use chr(32) but excel doesn't accept blank for a row. This is my code:

kg = Chr(32)
kq = kq & ", Item 1" & ", Item 2"

With com_code.validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=kg
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = "Options"
.ErrorTitle = ""
'.InputMessage = "Click yes or no"
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
 
Upvote 0
Thank for your reply
I tried use " " to replace chr(32) but excel doesn't accept empty row contain " ". Now, i use text to replace space.

Thank all
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,480
Members
452,915
Latest member
hannnahheileen

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