I'll give it a go
Make sure to place this into the "OFFLINE" workbook as the information is going to be copied into it.
Option Explicit
Sub CopyDynamicColumns()
Dim sourceWorkbook As Workbook
Dim offlineWorksheet As Worksheet
Dim sourceWorksheet As Worksheet
Dim lastRow As Long
Dim dynamicColumns() As Variant
Dim col As Variant
Dim i As Integer
Dim destCol As Integer
' Define the columns you want to copy (1-based index)
dynamicColumns = Array(2, 4, 6) ' Change this array to include the columns you want to copy from. It is currently set to copy columns B, D & F
' Set the offline worksheet where you want to paste the data
Set offlineWorksheet = ThisWorkbook.Worksheets("Sheet1") ' Change "Sheet1" to your OFFLINE (Targets) sheet's name
' Open the online workbook
Set sourceWorkbook = Workbooks.Open("https://your_online_excel_file_url_here.xlsx") ' Replace with the online Excel file URL
' Set the source worksheet from which you want to copy the data
Set sourceWorksheet = sourceWorkbook.Worksheets("Sheet1") ' Change "Sheet1" to your ONLINE (Source) sheet's name
' Find the last row with data in the source worksheet
lastRow = sourceWorksheet.Cells(sourceWorksheet.Rows.Count, "A").End(xlUp).Row
' Loop through each column you want to copy
destCol = 1
For Each col In dynamicColumns
' Copy the column from the source worksheet
sourceWorksheet.Range(sourceWorksheet.Cells(1, col), sourceWorksheet.Cells(lastRow, col)).Copy
' Paste the copied data into the offline worksheet
offlineWorksheet.Cells(1, destCol).PasteSpecial xlPasteValues
' Move to the next destination column
destCol = destCol + 1
Next col
' Close the online workbook without saving changes
sourceWorkbook.Close SaveChanges:=False
' Clean up
Application.CutCopyMode = False
Set sourceWorkbook = Nothing
Set offlineWorksheet = Nothing
Set sourceWorksheet = Nothing
End Sub