Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SMM SMM is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ExCel programming Jae[_2_] Charts and Charting in Excel 2 March 6th 07 07:44 PM
Excel/VBA Programming GHoward Excel Programming 4 February 6th 05 07:59 PM
Very New in Excel Programming Wael Mabsout Excel Programming 0 January 18th 04 07:26 PM
Excel programming not using COM Julia[_2_] Excel Programming 1 December 5th 03 11:27 AM
Excel Programming Dan Gorman Excel Programming 3 December 3rd 03 11:34 PM


All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"