This project has moved and is read-only. For the latest updates, please go here.

DataValidation with List on another worksheet

Sep 27, 2012 at 6:40 PM


I've a two worksheet, with one called ws and another wsLookup

I want to create a lookup list in wsLookup and refer it ws's Cells for validation purpose like the following

 cell.DataValidation.List(wsLookup.Range(rangeStartCell,rangeEndCell), true); 

Data validation always points to "=$F$3:$F$7" rather than ="Lookup!$F$3:$F$7", Lookup being the worksheet name

Any help will be appreciated

Sep 27, 2012 at 7:19 PM

I found the issue. I would appreciate if you can update a small bug in the code in

"class XLDataValidation" in "public void List(IXLRange range, Boolean inCellDropdown)" method. the range.Worksheet.Name +"!"+


  public void List(IXLRange range, Boolean inCellDropdown)
            AllowedValues = XLAllowedValues.List;
            InCellDropdown = inCellDropdown;
            Value =range.Worksheet.Name +"!"+ range.RangeAddress.ToStringFixed();
Sep 28, 2012 at 5:11 PM

Good catch. I added the change.


Sep 28, 2012 at 5:17 PM
Thank you for the great tool.


On Fri, Sep 28, 2012 at 11:11 AM, MDeLeon <> wrote:

From: MDeLeon

Good catch. I added the change.


Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at