Consulting

Results 1 to 4 of 4

Thread: Find and Replace Page Down in excel

  1. #1
    VBAX Newbie
    Joined
    Jun 2008
    Posts
    1
    Location

    Find and Replace Page Down in excel

    Hello,

    I have a excel spreadsheet which originates from a csv file originated from an MIS system.


    I want to put page breaks into the report and have created a marker (~) in the csv file where I want a page break.

    Unlike MS Word there is no Find and replace in excel (that i know) that would allow me to:

    1) Find ~
    2) Replace PageBreak.

    Please help

  2. #2
    VBAX Tutor
    Joined
    Jan 2008
    Posts
    266
    Location
    *cough* Ctrl + H *cough*

    but i diont know if its possible to make a pagebreak in excel.
    i think the topic has been up but i think its still unsolved.

  3. #3
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    [VBA]Sub Page_Break_With_Excel()
    Dim mycell As Range
    Dim myrange As Range
    Set myrange = ActiveSheet.Range("A1:A20")
    For Each mycell In myrange
    If mycell.Value = "~" Then
    'Activate the sheet where you want the
    'pagebreaks to be inserted
    ActiveSheet.HPageBreaks.Add before:=mycell
    End If
    Next mycell
    End Sub[/VBA]Charlize

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Ago
    but i diont know if its possible to make a pagebreak in excel.
    i think the topic has been up but i think its still unsolved.
    [vba]

    ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ACtiveCell
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •