General discussion

Locked

function that will return a cell referen

By nicholasP ·
Is there a function (something like Vlookup) that will return the cell reference of a cell that I'm looking for?

I need to find the last line on several worksheets and then instert some data and adjust some formulas.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

function that will return a cell referen

by roc180 In reply to function that will return ...

Within Excel if you want to find the last row that has data you will need to write a macro that will walk down a column evaluating the data until you come to the cell you are looking for, check out the ActiveCell property of the worksheet. If the cell you want is in the same place every time then your life is a lot easier you can use the Range or Cell property of the worksheet. The below code is an example of a macro used to walk down a column evaluating each cell and Capitalizing the contents of the cell:

Sub Set_Cap()
Dim intC As Integer

ActiveSheet.Range("A1").Select

intC = 1
While intC = 1
ActiveCell.Value = UCase(ActiveCell.Value)
ActiveCell.Offset(1, 0).Select 'Down 1
If ActiveCell = "" Then 'No More Data
intC = 2
End If
Wend

MsgBox "Done"

End Sub

If you have any other questions let me know.

Good Luck

Neal Martinelli

Collapse -

function that will return a cell referen

by nicholasP In reply to function that will return ...

The question was auto-closed by TechRepublic

Collapse -

function that will return a cell referen

by leaslynn In reply to function that will return ...

The easiest way to go to the last row is Ctrl+End, which will take you to the last cell in the sheet.

Collapse -

function that will return a cell referen

by nicholasP In reply to function that will return ...

The question was auto-closed by TechRepublic

Collapse -

function that will return a cell referen

by nicholasP In reply to function that will return ...

This question was auto closed due to inactivity

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums