Multiple cell entry: macro help

Chop Chop

New Member
Joined
Mar 3, 2011
Messages
2
Hi, I was wondering if someone could help me with a macro.
I added some buttons that add letters to the active cell. If I click the H button, for instance, it would add H to the active cell.
___________
Sub H()
'
' H Macro
'

'
ActiveCell.Value = "A"
With Selection.Font
.Color = -65536
.TintAndShade = 0
End With
End Sub
__________
What I would like for it to do is add it to all the highlighted cells. This way I can quickly Ctrl click the specified cells (eg. B12, C5, D8) and they would all be filled in at once using the button. I was wondering if someone could help modify the macro for that?

Also another question. Is there anyway to make the button stay on the screen. Rather than having several buttons, can I have them scroll down like they would if they were a frozen pane?

Thanks for your time.
 
Last edited:

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try

Code:
Sub H()
'
' H Macro
'

'
    With Selection
        .Value = "A"
        With .Font
            .Color = -65536
            .TintAndShade = 0
        End With
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,848
Members
452,948
Latest member
UsmanAli786

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