Can I record a macro on a cell that has text but not a text box

B

Bryan De-Lara

I want to record a macro that contains names from A6 down to A255. I need
each cell when clicked to go to Sheet 'A' on the corresponding name going
from D6 to IS6. Is there any way I can do this? If I make a text box, I can
use that to record the macro, but I have a CountA to count if the cell is
empty or not. I do not get the option to record macros. You help would be
welcomed. Thanks.

Bryan.
 
S

ShaneDevenshire

Hi,

You can record part of it but some will require manual coding. But I'm not
at all clear on what you want your macro to do.

To get the macro to respond to clicking on a cell in the range A6:A255 you
would begin with something like this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim isect As Range
Dim myItem
Set isect = Application.Intersect(Range("A6:A255"), Target)
If Not isect Is Nothing Then
myItem = Target
Sheets("A").Activate
'more code
End If
End Sub

Record whatever it is you are trying to do on sheet A and put that into the
more code lines
 
B

Bryan De-Lara

Shane, I have a worksheet with 250 names going down plus all the results
from other formulae from sheetA. On sheetA I have the same names going
across. I want to be able to click the cell with a name say Smith, and it
will go straight to Smith on the other sheet, then any data to be input
under that name can begin. It would save scrolling.

Bryan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top