Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Fill each time one cell/row with a specific number,for defined col

Hello,
I've a problem of designing all possibilities of below criteria on the same
range.
*Fill each time one cell/row
*Each row has a specific number to be filled for its cells
*The numbers of columns are defined.

For ex., for 3 rows and 4 columns, and for specific numbers of each rows,
the number of arrangements on a defined range is = 4^3=64. How will i see all
possibilities sequently replaced to the range? Thanks for help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Fill each time one cell/row with a specific number,for defined col

you can use a wroksheet change function like below. code will copy any data
in a range to sheet 2 placing each change is the first open cell in column A.

Sub worksheet_change(ByVal Target As Range)

Const StartRow = 1
Const EndRow = 4
Const StartCol = 3
Const EndCol = 6


For Each cell In Target
If (cell.Row = StartRow) And (cell.Row <= EndRow) And _
(cell.Column = StartCol) And (cell.Column <= EndCol) Then

'copy data to sheet 2
With Sheets("sheet2")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Cells(LastRow + 1, "A").Value = cell.Value
End With

End If

Next cell

End Sub


sub work

"nerohnze" wrote:

Hello,
I've a problem of designing all possibilities of below criteria on the same
range.
*Fill each time one cell/row
*Each row has a specific number to be filled for its cells
*The numbers of columns are defined.

For ex., for 3 rows and 4 columns, and for specific numbers of each rows,
the number of arrangements on a defined range is = 4^3=64. How will i see all
possibilities sequently replaced to the range? Thanks for help.

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
Run-time error '50290': Application-defined or object-defined erro Macro button Excel Discussion (Misc queries) 1 March 12th 09 10:59 AM
Number of tasks completed in a specific time frame Robert Excel Discussion (Misc queries) 2 February 3rd 06 01:25 PM
Cell fill color. Row to match specific cell. CADinDallas Excel Programming 3 January 4th 06 01:00 PM
Count number of times a specific number is displayed in a cell ran subs Excel Worksheet Functions 1 June 27th 05 05:01 PM
I am trying to color fill a cell based on specific criteria jglen Excel Discussion (Misc queries) 1 May 27th 05 05:30 PM


All times are GMT +1. The time now is 01:32 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"