Creating a named range and add cells to it.

Aug 22, 2012 at 2:30 PM
Edited Aug 22, 2012 at 3:06 PM

Hello everyone,

I dont know if this is possible or not and I couldnt find anything on google.

 

I want to create a defined name say "Evidence"

 

My excell sheet layout is like this:

 

  • Section
    • question1
    • question2
    • question3
  • section2
    • question4
    • question5
    • question6

And so on.

However I want to add all the question cells per row to the defined Name "Evidence", is it possible to skip cells in named ranges? Thank you for your help.

 

EDIT:

Maybe it is possible to do something like

where evidence is a list of string address'?

ExcelRange evidenceRange = ws.Cells[string.Join(", ", evidence)];

Example output: ExcelRange evidenceRange = ws.cells["D1, D2, D3, D7, D9"]