Extract all bolded cell values to another sheet

joand

Active Member
Joined
Sep 18, 2003
Messages
255
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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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

joand

Active Member
Joined
Sep 18, 2003
Messages
255
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

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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,195,628
Messages
6,010,771
Members
441,568
Latest member
abbyabby

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
Top