VBA 100 to a range of cells

phil133

Active Member
Joined
May 5, 2015
Messages
257
Office Version
  1. 365
Platform
  1. Windows
Hi. In this macro
Code:
Sheets("P_L constant face value").Select 
   Range("G6:G400").Select
    
    For i = 6 To 500 Step 2
    Range("T" & i).Copy
    Range("G" & i).PasteSpecial (xlPasteValues)
    Range("G" & i).Copy
    Range("G" & i + 1).PasteSpecial (xlPasteValues)
    Range("T" & i).Activate
    ActiveSheet.Calculate
    Next i
End Sub

I want to add after Range("G6:G400").Select that G6:G400 to have the value of 100.
Thanks for any help!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi. In this macro
Code:
Sheets("P_L constant face value").Select 
   Range("G6:G400").Select
    
    For i = 6 To 500 Step 2
    Range("T" & i).Copy
    Range("G" & i).PasteSpecial (xlPasteValues)
    Range("G" & i).Copy
    Range("G" & i + 1).PasteSpecial (xlPasteValues)
    Range("T" & i).Activate
    ActiveSheet.Calculate
    Next i
End Sub

I want to add after Range("G6:G400").Select that G6:G400 to have the value of 100.
Your question seems to indicate you want this...

Range("G6:G400").Value = 100

If that is not correct, then post some examples of what you have and what you want afterwards.
 
Upvote 0

Forum statistics

Threads
1,207,423
Messages
6,078,443
Members
446,339
Latest member
keogata

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