Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default formula for moving information from one sheet to another sheet

I have information in column A of a task sheet. The information goes from row
1 thru 35. Column B is where I place a "x" to say the task need to be
completed. Is there a formula that can check each row in column B to see if
the "x" exist, until it reaches the end. If the "x" exist in any of the rows,
then move the information into a blank sheet called assignment. Example
B1,B3,B4,B20 all have a "x" in the field, now I need to move the information
in A1, A3, A4, A20 to row1 thru 4 of a blank work sheet. Is this possible.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default formula for moving information from one sheet to another sheet

hi
not with a formula. formulas return value to the cell in which they reside.
they can not perform actions like move data to other specific cellls. you
would have to have the formulas set up on the blank sheet to do this.
what you want smells like a macro. not sure but i whipped this out. not to
pretty but it works.
right click your first sheet and from the pop up, click view code. paste the
below in the big white box. adjust sheet names and cell references to suit.
when you enter an "x" in column b, the contents of the cell next to the x in
column A will tranfer to sheet 2 column A.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Range
Set r = Range("B:B")
If Selection.Count 1 Then
Exit Sub
End If
If Intersect(Target, r) Is Nothing Then
Exit Sub
Else
If Target.Value < "x" Then
Exit Sub
Else
Sheets("sheet2").Range("A65000").End(xlUp).Offset( 1, 0) = _
Target.Offset(0, -1)
End If
End If
End Sub

"Puzzled" wrote:

I have information in column A of a task sheet. The information goes from row
1 thru 35. Column B is where I place a "x" to say the task need to be
completed. Is there a formula that can check each row in column B to see if
the "x" exist, until it reaches the end. If the "x" exist in any of the rows,
then move the information into a blank sheet called assignment. Example
B1,B3,B4,B20 all have a "x" in the field, now I need to move the information
in A1, A3, A4, A20 to row1 thru 4 of a blank work sheet. Is this possible.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default formula for moving information from one sheet to another sheet

Thank You very much

"FSt1" wrote:

hi
not with a formula. formulas return value to the cell in which they reside.
they can not perform actions like move data to other specific cellls. you
would have to have the formulas set up on the blank sheet to do this.
what you want smells like a macro. not sure but i whipped this out. not to
pretty but it works.
right click your first sheet and from the pop up, click view code. paste the
below in the big white box. adjust sheet names and cell references to suit.
when you enter an "x" in column b, the contents of the cell next to the x in
column A will tranfer to sheet 2 column A.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Range
Set r = Range("B:B")
If Selection.Count 1 Then
Exit Sub
End If
If Intersect(Target, r) Is Nothing Then
Exit Sub
Else
If Target.Value < "x" Then
Exit Sub
Else
Sheets("sheet2").Range("A65000").End(xlUp).Offset( 1, 0) = _
Target.Offset(0, -1)
End If
End If
End Sub

"Puzzled" wrote:

I have information in column A of a task sheet. The information goes from row
1 thru 35. Column B is where I place a "x" to say the task need to be
completed. Is there a formula that can check each row in column B to see if
the "x" exist, until it reaches the end. If the "x" exist in any of the rows,
then move the information into a blank sheet called assignment. Example
B1,B3,B4,B20 all have a "x" in the field, now I need to move the information
in A1, A3, A4, A20 to row1 thru 4 of a blank work sheet. Is this possible.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default formula for moving information from one sheet to another sheet

You can use formulas to achieve the desired functionality in the new "blank"
sheet, dynamically

Assume your source data in Sheet1, in A2 down
In B2 down is where you will mark "x"

In your new "blank" sheet,
In A2: =IF(Sheet1!B2="x",ROW(),"")
In B2:
=IF(ROWS($1:1)COUNT(A:A),"",INDEX(Sheet1!A:A,SMAL L(A:A,ROWS($1:1))))
Copy A2:B2 down to cover the max expected extent of source data.
Hide/minimize col A. Col B will return the required results, all neatly
bunched at the top. voila? hit YES below. Easily modify the criteria in A2 to
suit what-you-want.
--
Max
Singapore
---
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default formula for moving information from one sheet to another sheet

impressive. could you break down the logic behind this formula.

regards
FSt1

"Max" wrote:

You can use formulas to achieve the desired functionality in the new "blank"
sheet, dynamically

Assume your source data in Sheet1, in A2 down
In B2 down is where you will mark "x"

In your new "blank" sheet,
In A2: =IF(Sheet1!B2="x",ROW(),"")
In B2:
=IF(ROWS($1:1)COUNT(A:A),"",INDEX(Sheet1!A:A,SMAL L(A:A,ROWS($1:1))))
Copy A2:B2 down to cover the max expected extent of source data.
Hide/minimize col A. Col B will return the required results, all neatly
bunched at the top. voila? hit YES below. Easily modify the criteria in A2 to
suit what-you-want.
--
Max
Singapore
---

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
Formula to copy related information from sheet 1 to sheet 2 dave Excel Worksheet Functions 1 December 5th 09 02:00 AM
can I use information from another sheet modify it, into a formula Mary Excel Worksheet Functions 3 March 5th 09 06:47 PM
moving informatiion from one sheet to a total sheet john Excel Discussion (Misc queries) 2 January 31st 08 10:17 PM
How to change a MATCH formula when moving it to a different sheet Bob Moore Excel Discussion (Misc queries) 2 November 26th 06 04:39 PM
moving formula resupts to another sheet automatically jv Excel Worksheet Functions 1 February 27th 05 01:40 PM


All times are GMT +1. The time now is 12:49 AM.

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"