Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Automatically create list in different sheet on basis of other lis

Is it possible to create a new list based on the contents of the values in
the first sheet?

I have a list in the first sheet of my workbook. In column B I have all
sorts of values from 0001 to 9999.

What I want: on the second sheet I want that list automatically generated,
but only when they have values of 4000 to 4999 and 8000 to 8999 in column B.

An event macro or something? But how?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default Automatically create list in different sheet on basis of other lis

Something like this macro maybe. Place this macro in the sheet module of
the sheet that holds the original list. I chose "OtherSheet" as the name of
the destination sheet. Change this as you wish. Note that this macro fires
whenever a value is changed in Column B. As such, it will operate on only
that one value. Whenever another cell is changed in that column, the macro
will operate on that value. The macro would have to be rewritten if you
want it to operate on every value in the entire column in one run of the
macro. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
If Not Intersect(Target, Range("B:B")) Then
If (Target.Value = 4000 And Target.Value <= 4999) Or _
(Target.Value = 8000 And Target.Value <= 8999) Then
With Sheets("OtherSheet")
.Range("A" & Rows.Count).End(xlUp).Offset(1) =
Target.Value
End With
End If
End If
End Sub
"Pair_of_Scissors" wrote in
message ...
Is it possible to create a new list based on the contents of the values in
the first sheet?

I have a list in the first sheet of my workbook. In column B I have all
sorts of values from 0001 to 9999.

What I want: on the second sheet I want that list automatically generated,
but only when they have values of 4000 to 4999 and 8000 to 8999 in column
B.

An event macro or something? But how?



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
Need a to automatically create a new excel from every sheet benny Excel Discussion (Misc queries) 1 January 28th 08 10:35 PM
Create macro to copy data on a scheduled basis faureman Excel Discussion (Misc queries) 0 January 25th 07 04:25 PM
create a formula in one sheet that would read data from separate sheet automatically QD Excel Discussion (Misc queries) 0 December 8th 06 04:17 AM
How to Create a list which sort itself automatically Taitan-x Excel Worksheet Functions 1 July 24th 06 04:27 AM
how do I create a spread sheet to automatically calculate when I wbinfo New Users to Excel 2 September 28th 05 08:41 PM


All times are GMT +1. The time now is 11:27 PM.

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

About Us

"It's about Microsoft Excel"