+ Reply to Thread
Results 1 to 2 of 2

Thread: Selectively referencing formatted text (bold cells) from one sheet to another

  1. #1
    Registered User
    Join Date
    08-18-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Selectively referencing formatted text (bold cells) from one sheet to another

    I am trying to copy certain rows from one sheet (Sheet 1) to another (Sheet 2), but only rows in Column A (of Sheet 1) with Bold formatting. Please note that in both Sheet 1 and Sheet 2 there will be rows added and/or subtracted from between the rows with Bold formatting.

    This excel file will be used for a construction management office. It contains certain information (Bold formatted) on the Scope of the project (Sheet 1) which will transfer over to a Budget (Sheet 2).

  2. #2
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    351

    Re: Selectively referencing formatted text (bold cells) from one sheet to another

    I don't think there's a native excel function that will allow you to do that. If you're willing to use VBA here is an example of code that will do what you're looking for. This assumes that the bold cells are in column A.
    Sub CopyBoldRows()
        Dim rRow        As Range
        Dim sSelection  As String
        
        For Each rRow In Range("A2", Cells(Rows.Count, 1).End(xlUp))
            If rRow.Font.Bold Then
                sSelection = sSelection & IIf(sSelection = "", "", ",") & rRow.Row & ":" & rRow.Row
            End If
        Next
        
        Range(sSelection).Select
        Selection.Copy Sheet2.Cells(Rows.Count, 1).End(xlUp).Offset(1)
    End Sub
    -Greg If this is helpful, pls click Star icon in lower left corner

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0