5 pts.
 VB Active Cell problem
I am a vb problem. On an excel sheet, I am trying to have a macro run when the user selects a changing column's active cell. For columns F to I on Sheet!Data, if you choose any cell in range (F9:I65000), then take the value of Column B in the selected row and make as my "Dept" Value. Can anyone help?

Software/Hardware used:
ASKED: March 30, 2009  3:34 PM
UPDATED: February 22, 2010  11:10 AM

Answer Wiki:
Try putting this in your worksheets code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If ActiveCell.Column = 6 Then If ActiveCell.Row >= 1 And ActiveCell.Row <= 65000 Then Range("Dept").Value = Range("B" & ActiveCell.Row) End If End If End Sub This assumes that you have a named cell called Dept Hope this helps
Last Wiki Answer Submitted:  February 22, 2010  11:10 am  by  Darraca   260 pts.
All Answer Wiki Contributors:  Darraca   260 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _