Extract all bolded cell values to another sheet

joand

Active Member
Joined
Sep 18, 2003
Messages
266
I have an excel sheet (Sheet 1 range A1: D8) that contains numerous data. I want to extract only cells that have the following format: font size 14 and bold to another sheet (Sheet 2, starting at range A1). Cells in the range either have font size and 10 normal or font size and bold.

Anyone has ideas?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try

Code:
Sub test()
Dim c As Range
For Each c In Range("A1:D8")
    If c.Font.Bold = True Then
        c.Copy Destination:=Sheets("Sheet2").Range(c.Address)
    End If
Next c
End Sub
 
Upvote 0
Is there a way this macro doesn't copy the formatting of the extracted values? Also, the extracted values should be listed in Sheet 2 starting in A1, then A2 then A3...
 
Upvote 0
Try

Code:
Sub test()
Dim c As Range, i As Integer
For Each c In Range("A1:D8")
    If c.Font.Bold = True Then
        i = i + 1
        Sheets("Sheet2").Range("A" & i).Value = c.Value
    End If
Next c
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top