is it possible ? or do i have to erase the sections in the g-code editor that i dont want ?

i have a file 260 000 lines long and only want to run a certain section of it , do i have to trial and error erase the sections i dont want ? or is there a way to see where i can 'trim' the start and stops of the g-code ? hope this makes sense