Inserting cell values only

FACTOR 21

Board Regular
Joined
Mar 3, 2014
Messages
110
I have the following code which works fine, but I need to Insert the cell values only as some of the values are derived from a =IF(VLOOKUP....... command.

Code:
Sub BacsDatabaseInsert()
'
' Bacs Database Insert Macro
'
Dim r As Range
Application.ScreenUpdating = False
    
       Sheets("Master Sheet GBP").Select
    Dim lr As Long
lr = Sheets("Master Sheet GBP").Cells(Rows.count, 1).End(xlUp).Row
Sheets("Master Sheet GBP").Range("B348:G" & lr).Copy
    Sheets("Database").Select
        Range("A2").Select
    Selection.Insert Shift:=xlDown
    Application.ScreenUpdating = True
    ActiveWorkbook.Save
    'ActiveWorkbook.Close
    End Sub

Thanks in advance
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Maybe try:

Code:
    Selection.Insert Shift:=xlDown
    With Selection.Resize(lr - 348 + 1, 6)
        MsgBox .Address
        .Value = .Value
    End With
 
Upvote 0

Forum statistics

Threads
1,213,530
Messages
6,114,163
Members
448,554
Latest member
Gleisner2

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