A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

formula for moving information from one sheet to another sheet



 
 
Thread Tools Display Modes
  #1  
Old June 5th, 2010, 06:59 PM posted to microsoft.public.excel.misc
puzzled
external usenet poster
 
Posts: 62
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  
Old June 5th, 2010, 09:24 PM posted to microsoft.public.excel.misc
FSt1
external usenet poster
 
Posts: 2,788
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  
Old June 5th, 2010, 10:29 PM posted to microsoft.public.excel.misc
puzzled
external usenet poster
 
Posts: 62
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  
Old June 6th, 2010, 04:18 AM posted to microsoft.public.excel.misc
Max
external usenet poster
 
Posts: 8,574
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  
Old June 6th, 2010, 05:58 AM posted to microsoft.public.excel.misc
FSt1
external usenet poster
 
Posts: 2,788
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
---

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:18 AM.


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