Populating Excel Range as Data Validation into cell

  • I have a code which is working fine but it has corrupted the file i do not know why this thing is happening. I have attached a sample workbook.


    If you could please help me to fix this i will appreciated the help.



    “We found a problem with some content in ‘filename.xlsx’. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes. then i add in immediate window this and press enter and this "? application.StartupPath" appear expected : line number or label or statement or end of statement

  • A data validation formula is limited to 255 characters. You should put the data into a range somewhere and use that as the source for the DV list.

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

  • I mean actually put the list into some cells on a sheet and then use the address of those cells as the formula for the data validation.

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!