Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
programming in excel
ive got 10 cell numbered from 1 to 10 A1 to A10 then ive got 1 cell C5 if
i put a number in cell C5 1 to 10 it will put a x in the cell 1 to 10 excemple i put number 5 in cell c5 then in cell number 5 (A5) number a X will appear i put number 4 in cell c5 then in cell number 4 (A4) number a X will appear |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
programming in excel
Something like this in the worksheet code module to trap the worksheet_change
event. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$C$5" Then Exit Sub If Not IsNumeric(Target.Value) Then Exit Sub If Target.Value = 1 And Target.Value <= 10 Then Range("A" & Target.Value).Value = "X" End If End Sub "smm" wrote: ive got 10 cell numbered from 1 to 10 A1 to A10 then ive got 1 cell C5 if i put a number in cell C5 1 to 10 it will put a x in the cell 1 to 10 excemple i put number 5 in cell c5 then in cell number 5 (A5) number a X will appear i put number 4 in cell c5 then in cell number 4 (A4) number a X will appear |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
programming in excel
You can also do it with worksheetfunctions
in a1 put =if($c$5=row(),"X","") and copy down into cells a2:a10. Enter the number in C5 and the x appears. -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "Vergel Adriano" wrote: Something like this in the worksheet code module to trap the worksheet_change event. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$C$5" Then Exit Sub If Not IsNumeric(Target.Value) Then Exit Sub If Target.Value = 1 And Target.Value <= 10 Then Range("A" & Target.Value).Value = "X" End If End Sub "smm" wrote: ive got 10 cell numbered from 1 to 10 A1 to A10 then ive got 1 cell C5 if i put a number in cell C5 1 to 10 it will put a x in the cell 1 to 10 excemple i put number 5 in cell c5 then in cell number 5 (A5) number a X will appear i put number 4 in cell c5 then in cell number 4 (A4) number a X will appear |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ExCel programming | Charts and Charting in Excel | |||
Excel/VBA Programming | Excel Programming | |||
Very New in Excel Programming | Excel Programming | |||
Excel programming not using COM | Excel Programming | |||
Excel Programming | Excel Programming |