Row and Column from a Cell Input

helpexcel

Well-known Member
Joined
Oct 21, 2009
Messages
656
Hi - I have a spreadsheet where the user put in the starting cell of data that's to be used. So they would put "G7" in cell B2. I'm trying to get code that will split that G7 into row and column. I was using the code below that had the user enter the row and column separately, but it's much simpler to have them enter both together. Any help is appreciated.

VBA Code:
Dim rng As Range
Dim colFR As Variant
With ws2
     colFR = .Range("B2")
    Set rowFR = .Range("D2")
End With

Dim LastRow As Long
With ws1
    LastRow = .Cells(.Rows.Count, colFR).End(xlUp).Row
    Set rng = .Range(.Cells(rowFRD, colFR), .Cells(LastRow, colFR))
    rng.Copy ws3.Range("A3")
End With
 
Hi,

A tiny modification : =IF(B2="","", theFormula)
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,215,492
Messages
6,125,116
Members
449,206
Latest member
burgsrus

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