Try the Function below, will return the number of columns you need to Offset from your Rng to the "Header" you are looking for.

Option Explicit

Function OffesttoHeader(CurrentCol As Long, FindRng As Range, HeaderStr As String) As Long

    Dim HeaderRng As Range

    Set HeaderRng = FindRng.Find(what:=HeaderStr)
    If Not HeaderRng Is Nothing Then
        OffesttoHeader = HeaderRng.Column - CurrentCol + 1
    Else
        OffesttoHeader = -10000 ' raise to a large value >> as an error
    End If

End Function

Test Sub Code (to test the function above):

Sub Test()

Dim ws As Worksheet
Dim Rng As Range
Dim NumberofCols As Long

Set ws = ThisWorkbook.Sheets("Sheet1")  ' modify to your sheet's name
Set Rng = ws.Range("B1:B20")

' pass the following parameters:
' 1. Rng.column - in your case column B = 2
' 2. ws.Rows(1) - the Range to search for the Header, first row in ws worksheet
' 3. "Header" - the Header string you are searching for
NumberofCols = OffesttoHeader(Rng.Column, ws.Rows(1), "Header")

' raise an error message box
If NumberofCols = -10000 Then
    MsgBox "Unable to find Header"
End If

End Sub    
Answer from Shai Rado on Stack Overflow
🌐
Microsoft Learn
learn.microsoft.com › en-us › office › vba › api › excel.range.offset
Range.Offset property (Excel) | Microsoft Learn
Access to this page requires authorization. You can try changing directories. ... Returns a Range object that represents a range that's offset from the specified range. ... This example activates the cell three columns to the right of and three rows down from the active cell on Sheet1.
🌐
Wall Street Mojo
wallstreetmojo.com › home › all blogs › vba resources › vba offset
VBA OFFSET Function - Definition, Examples, How to Use?
April 30, 2025 - Instead, we need to use the VBA RANGE object first. Then, from that range object, we can use the OFFSET property. In Excel, the range is nothing but a cell or range of the cell. Since OFFSET refers to cells, we need to use the object RANGE first, ...
🌐
Super User
superuser.com › questions › 1483015 › vba-range-with-offset-instead-of-strictly-given-rows-columns
microsoft excel - vba range with offset instead of strictly given rows/columns - Super User
September 16, 2019 - The original code: Range("T9:T" & furthest_row).Select choose specific rows with reduced range (furthest_row), fulfilling some criterias and insert some data there. The new code: "T9:T" must be with relative referencing.
Top answer
1 of 3
2

Try the Function below, will return the number of columns you need to Offset from your Rng to the "Header" you are looking for.

Option Explicit

Function OffesttoHeader(CurrentCol As Long, FindRng As Range, HeaderStr As String) As Long

    Dim HeaderRng As Range

    Set HeaderRng = FindRng.Find(what:=HeaderStr)
    If Not HeaderRng Is Nothing Then
        OffesttoHeader = HeaderRng.Column - CurrentCol + 1
    Else
        OffesttoHeader = -10000 ' raise to a large value >> as an error
    End If

End Function

Test Sub Code (to test the function above):

Sub Test()

Dim ws As Worksheet
Dim Rng As Range
Dim NumberofCols As Long

Set ws = ThisWorkbook.Sheets("Sheet1")  ' modify to your sheet's name
Set Rng = ws.Range("B1:B20")

' pass the following parameters:
' 1. Rng.column - in your case column B = 2
' 2. ws.Rows(1) - the Range to search for the Header, first row in ws worksheet
' 3. "Header" - the Header string you are searching for
NumberofCols = OffesttoHeader(Rng.Column, ws.Rows(1), "Header")

' raise an error message box
If NumberofCols = -10000 Then
    MsgBox "Unable to find Header"
End If

End Sub    
2 of 3
0

In order to obtain the solution you seek above, use the Range.Find Method.

'Column Number
Dim clmCountry as Integer

From here, we want to find the header by using the Range.Find Method

'to find the header
With ThisWorkbook.Sheets("SheetName")

    'update the range if necessary
    clmCountry = .Range("A1:Z1").Find("HeaderName").Column

End With

Once you've found the desired column, you may offset the following way:

... Offset(RowNum, clmCountry).Value = ...
🌐
Excel Easy
excel-easy.com › vba › examples › offset.html
Offset Property in Excel VBA - Step by Step Tutorial
The Offset property in Excel VBA takes the range which is a particular number of rows and columns away from a certain range. Place a command button on your worksheet and add the following code lines: 1. The Offset property below returns a range ...
🌐
ExcelMojo
excelmojo.com › home › vba › vba offset
VBA Offset Excel - Function, Examples, How to Use?
July 2, 2025 - Range(“Cell Reference”): To access the OFFSET function in VBA, first, we need to provide the cell’s address using the RANGE object. [Row Offset]: The number of rows we need to offset. If we provide a positive number, it will move down from the given cell and if we provide a negative number, then, it will move up from the given cell. [Column Offset]: The number of columns we need to offset.
🌐
Excel Champs
excelchamps.com › home › vba › excel vba offset – how to use it
Excel VBA Offset - How to use it
May 19, 2024 - ColumnOffset is the number of columns that move from the starting cell. Positive numbers move right; negative number moves left. Specify the range from where you want to start. Enter a dot (.) to get a list of properties and methods.
🌐
EDUCBA
educba.com › home › vba › vba resources › vba lookup & reference functions › vba offset
VBA OFFSET | How to Use OFFSET Function in Excel VBA with example?
July 8, 2021 - Suppose, if you want to move down ... To use OFFSET function in VBA, we have to use VBA RANGE object because OFFSET refers cells and from that RANGE object we can use OFFSET function....
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
Find elsewhere
🌐
ExcelDemy
exceldemy.com › home › macros & excel vba › excel vba offset column (5 suitable cases)
Excel VBA Offset Column (5 Suitable Cases) - ExcelDemy
June 18, 2024 - To move right from the current cell, we will define the row offset as zero and provide the column offset value. ... Offset(0, 1) : Moves the currently active cell to the next column while the row remains unchanged. ... Select a cell in the ...
🌐
Homeandlearn
homeandlearn.org › the_offset_property.html
Excel VBA Programming - the Offset property
When specifying a range of cells with offset, not only does the first cell (A1 above) get moved across and down 1 but the last cell (C3) gets moved across 1 and down 1. If all this is confusing, let's clear it up with a few practical examples. Return to your coding window from the previous lesson. Create another Sub and give it the name Range_Offset. Add the following code: Range("A1").Offset(RowOffSet:=1, ColumnOffset:=1).Select
🌐
Better Solutions
bettersolutions.com › excel › cells-ranges › vba-offset-method.htm
Excel Cells & Ranges - VBA Offset Method
2 weeks ago - The preferred method though is to use the Offset property. ActiveCell.Offset(rowindex, columnindex).Value = 15 ActiveCell.Offset(1, 1).Value = 15 ActiveCell.Offset(1, -2).Select Range(ActiveCell.Offset(1).
🌐
Affordsol
affordsol.be › vba-code-2-6-cells-ranges.htm
VBA Excel Range Cells and Offset
The three words in VBA Excel that you will use the most to move around the worksheet are: Range, Offset and Select. Always use Range rather than Cells
🌐
Udemy
blog.udemy.com › home › excel vba offset: how to jump ahead of the row
Excel VBA Offset: How to Jump Ahead of the Row - Udemy Blog
December 4, 2019 - The OffSet property is usually used in tandem with the Range property to specify a new location. Let’s take a look at this example · Range("B1").Offset(RowOffSet:=1, ColumnOffset:=1).Select
🌐
500rockets
500rockets.io › home › excel › how to use vba excel offset to select cells programmatically
How to use VBA Excel Offset to Select Cells Programmatically | 500 Rockets Marketing
October 5, 2023 - Offset(3, 2) - this defines our offset range. This part of the code will indicate that VBA needs to move 3 rows downward and 2 columns right.
🌐
MrExcel
mrexcel.com › forums › question forums › excel questions
VBA always offset to specific row | MrExcel Message Board
November 3, 2021 - Just noticed title is wrong. Meant specific column, not row I am attempting to have set of floating buttons in my sheet. I have managed to accomplish this with the following code: With ActiveSheet.Shapes("shape name") .Top = Target.Offset(1).Top .Left = Target.Offset(, 1).Left End With...
🌐
MrExcel
mrexcel.com › forums › question forums › excel questions
Selecting a block of cells using offset | MrExcel Message Board
November 4, 2019 - The code in my line below copies C3, B3, and A3, but I'd like to do it using the active cell and offset functions. Can someone please advise? ... Sub HighlightCells() 'ActiveCell.Offset(0, -2).Select Range("C3", Range("C3").End(xlToLeft)).Copy End Sub ... Hi Fluff Thanks for the prompt response. That code works if the active cell is E3, F3 or a column further down the alphabet.
🌐
MrExcel
mrexcel.com › forums › question forums › excel questions
ActiveCell Offset to certain column | MrExcel Message Board
August 25, 2016 - I know how the syntax goes for ActiveCell.Offset .........ActiveCell.Offset(0, 2).value....... etc.......when using #'s. I would like to get the value of column 'H' no matter what cell a user would click in of a certain row. Any help?
🌐
MrExcel
mrexcel.com › forums › question forums › excel questions
Use Range.Offset Method with cell value | MrExcel Message Board
September 9, 2020 - VBA Code: fn.Offset(, Range("B2").Value).Resize(, Range("D2").Value).Copy c.Offset(, 4) If that is what you mean · Upvote 0 · U · Joined · Sep 4, 2020 · Messages · 39 · Office Version · 365 · Platform · Windows · Sep 9, 2020 · #3 · it's almost it, is there a way to it undesrtand the entire column?
🌐
Excel-vba
excel-vba.com › vba-excel-lesson-2-6-2-offset.htm
VBA Excel Range Cells and Offset
The Offset property is the one that you will use the most with Range to move around the sheet. It is the very important property that allows you to move right, left, up and down and to extend the size of the selection · To move one cell down (from B2 to B3): Range("B2").Offset(1,0).Select ...