Apply a certain header for just a range of pages

Hi
My problem is this:
I want to create the header CHAPTER 1 and also the header CHAPTER 2
Want I want to do is applying the header CHAPTER 1 for a certain range of pages, let’s say from page 1 to page 23.
And then, I want to apply the header CHAPTER 2 for the pages 24 to 35… for example.
Okay, I don’t know very well how to do this? because if I create a custom header CHAPTER 1 and I apply it, it is working fine… but when I want to apply other header for the next pages, what happens to me is that the header from all the previous pages, change.
So if I have applied the header CHAPTER 1 from the page 1 to the 23…
When I am in the page 24 and I want to apply the header CHAPTER 2… what happen (when I apply this new header custom style CHAPTER 2) is all the previous pages change… so now from the page 1 to the 23, I have the header CHAPTER 2… well I don’t want this.
I want a range of pages have a certain header, and also other range of pages have another different header, without changing the selected custom headers I have for other pages.
How may I do this?
Cheers

You can use either page styles (with manual page breaks) or fields depending on the type of content you want to include in your header (which you do not indicate). I give a step-by-step guide on creating a document with different footers here using page styles. The same process applies to headers.

Hello, fine, problem solved.
However, I am having now a different problem with the headers and footers, to clarify the thread and because is a different problem to the one exposed here, I am opening a new thread.
Again, thanks for your help.

See: Advanced use of headers / footers in Writer (right page, left page)