Page 2 of 2 FirstFirst 1 2
Results 11 to 18 of 18

Thread: A Formating Question ??

  1. #11
    Magician navic's Avatar
    Join Date
    Aug 2013
    Location
    Europe, Croatia
    Posts
    887
    Articles
    0
    Excel Version
    Excel 2013


    Register for a FREE account, and/
    or Log in to avoid these ads!

    Quote Originally Posted by Pheno View Post
    When you scroll down I would like the second header that comes up, to replace the top header.
    I'm sorry, I'm no longer able to help.
    I hope that someone else will try to help you.
    Good luck.
    My personal Web Excel Tutorials
    Attention! In the formulas as a delimiter I use a semicolon (; ) if you using my formula, then perhaps you need to use a comma (,)
    Also for a decimal number I use a comma (,) you may need to use point (.) instead of

  2. #12
    Magician navic's Avatar
    Join Date
    Aug 2013
    Location
    Europe, Croatia
    Posts
    887
    Articles
    0
    Excel Version
    Excel 2013
    Hi @Pheno
    I have a new idea if it suits you.

    You can create a new sheet "helper".
    On it put two headers.
    Using VBA shortcut, you can switch the headers.

    This VBA code put in VBE Module1
    Code:
    Sub CopyFirstHader()
    'shortcut Ctrl+Shift+K
    Application.ScreenUpdating = False
        Sheets("helper").Select
        Range("A1:P1").Select
        Selection.Copy
        Sheets("RACI Template").Select
        Range("A1").Select
        ActiveSheet.Paste
        Range("A4").Select
    Application.ScreenUpdating = True
    End Sub
    
    Sub CopySecondHeader()
    'shortcut Ctrl+Shift+L
    Application.ScreenUpdating = False
        Sheets("helper").Select
        Range("A2:P2").Select
        Selection.Copy
        Sheets("RACI Template").Select
        Range("A1").Select
        ActiveSheet.Paste
        Range("A4").Select
    Application.ScreenUpdating = True
    End Sub
    Set shortcut key for each VBA procedure.

    See one of the attachment file
    Attached Files Attached Files
    My personal Web Excel Tutorials
    Attention! In the formulas as a delimiter I use a semicolon (; ) if you using my formula, then perhaps you need to use a comma (,)
    Also for a decimal number I use a comma (,) you may need to use point (.) instead of

  3. #13
    Magician navic's Avatar
    Join Date
    Aug 2013
    Location
    Europe, Croatia
    Posts
    887
    Articles
    0
    Excel Version
    Excel 2013

    Change header of first row based on selected row

    Hi @Pheno
    Here's a new idea.
    Excel automatically changes the header based on the selected row
    Attached Files Attached Files
    My personal Web Excel Tutorials
    Attention! In the formulas as a delimiter I use a semicolon (; ) if you using my formula, then perhaps you need to use a comma (,)
    Also for a decimal number I use a comma (,) you may need to use point (.) instead of

  4. #14
    Seeker Pheno's Avatar
    Join Date
    Jul 2016
    Location
    Southern California
    Posts
    8
    Articles
    0
    Can you post the code please, every time I try and download the file it wants to be saved as a .php

  5. #15
    Magician navic's Avatar
    Join Date
    Aug 2013
    Location
    Europe, Croatia
    Posts
    887
    Articles
    0
    Excel Version
    Excel 2013
    Quote Originally Posted by Pheno View Post
    Can you post the code please, every time I try and download the file it wants to be saved as a .php
    here is
    Code:
    Option Explicit
    
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
                
                If ActiveCell.Row < 35 Then
                    Worksheets("helper").Range("A1:P1").Copy Worksheets("RACI Template").Range("A1:P1")
                    Application.CutCopyMode = False
                End If
                
                If ActiveCell.Row >= 35 Then
                    Worksheets("helper").Range("A2:P2").Copy Worksheets("RACI Template").Range("A1:P1")
                    Application.CutCopyMode = False
                End If
    End Sub
    My personal Web Excel Tutorials
    Attention! In the formulas as a delimiter I use a semicolon (; ) if you using my formula, then perhaps you need to use a comma (,)
    Also for a decimal number I use a comma (,) you may need to use point (.) instead of

  6. #16
    Seeker Pheno's Avatar
    Join Date
    Jul 2016
    Location
    Southern California
    Posts
    8
    Articles
    0
    I think I am doing something wrong. I have right clicked on the tab at the bottom, selected "view code", copied the script into the window, saved the document, reopened and nothing happens. I have saved it as a macro-enabled file as prompted so I am not sure if these are the proper steps?

  7. #17
    Magician navic's Avatar
    Join Date
    Aug 2013
    Location
    Europe, Croatia
    Posts
    887
    Articles
    0
    Excel Version
    Excel 2013

    Automatic change or display headers based on the selected row

    Quote Originally Posted by Pheno View Post
    I think I am doing something wrong.
    What more can I say.
    Here are screenshots, probably will be clearer

    'helper' sheet. There is two headers (blue and green)



    'RACI Template' sheet. Selected cell A12 in Row12. Visible is the "blue" header.
    Therefore, the selected row is less than 35



    'RACI Template' sheet. Selected cell A44 in Row44. Visible is the "green" header
    Therefore, the selected row is greater than or equal to 35



    Excel VBE window. Module sheet "Sheet1(RACI Template)"



    Good luck.

    btw: Format file need be *.xls or *.xlsm
    My personal Web Excel Tutorials
    Attention! In the formulas as a delimiter I use a semicolon (; ) if you using my formula, then perhaps you need to use a comma (,)
    Also for a decimal number I use a comma (,) you may need to use point (.) instead of

  8. #18
    Seeker Pheno's Avatar
    Join Date
    Jul 2016
    Location
    Southern California
    Posts
    8
    Articles
    0
    Well, I have tried to implement this and I cant figure out the helper sheet. I also can not download the file you upload as it says its a Excel document but will only download in as a .php, and I have no idea what to do with that. I have tried from three different systems and it is not a .xls or .xlsm so I thank you for your efforts, but I cant seem to make any of them work.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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