Jump to specific column/ Cell when choosing a value in a combo box

Dedeke

Board Regular
Joined
Dec 1, 2020
Messages
70
Office Version
  1. 2016
Platform
  1. Windows
hi there,
Im using the code below to jump to the name chosen in the combobox.
Is it possible to change the c.select (which is the matching cell) to jump 3 cells down.

Example: Combobox select name x ( lets say this name is in range H2)
Now i want to jump to range H6 instead of H2(wich is defined by c.select)
Why?? My range H2:Bx3 contains formulas like ==Data!B24


VBA Code:
Private Sub ComboBox1_Change()
'Om naam te kiezen en onmiddellijk naar deze kolom te gaan
Dim c As Range
For Each c In Range("H2:Bx3") '(this is where the values are)
If c.Value = ComboBox1.Value Then
c.Select
On Error Resume Next
Exit Sub
End If
Next
End Sub
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
hi there,
Im using the code below to jump to the name chosen in the combobox.
Is it possible to change the c.select (which is the matching cell) to jump 3 cells down.

Example: Combobox select name x ( lets say this name is in range H2)
Now i want to jump to range H6 instead of H2(wich is defined by c.select)
Why?? My range H2:Bx3 contains formulas like ==Data!B24


VBA Code:
Private Sub ComboBox1_Change()
'Om naam te kiezen en onmiddellijk naar deze kolom te gaan
Dim c As Range
For Each c In Range("H2:Bx3") '(this is where the values are)
If c.Value = ComboBox1.Value Then
c.Select
On Error Resume Next
Exit Sub
End If
Next
End Sub
Try using offset(r,c):

Instead of using:

c.Select

Try replacing with:

c.Offset(4,0).Select
 
Upvote 0
Solution
Thx Breynolds0431

This works fine for me.
Marked as solution as well.
In the future, when marking a post as the solution, please be sure to actually mark the first post that contained the solution (not your own thread acknowledging that some other post is the solution).
I have corrected this for you.
Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,436
Members
449,083
Latest member
Ava19

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