Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default New user and need help

Here is what I need to do I have been working on a sales sheet that will
track the sales via a won loss ratio. Now what I have been trying to do is to
take all of the information from the "activity" sheet and copy or perfer move
it to a sheet based as "lost" or "Won" drop down menu.

I don't know the first thing about how to make a macro work automatic once
the menu is used.

There are a total of three sheets to this report what needs to be done. The
activities sheet which will be the only one that employees will be entering
information. The other sheets are won and lost sheet the the information will
be transfered to.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default New user and need help

I don't know if this will help, I have recorded a macro. I know it needs fine
tuning as it is only good for that line and it does not take into
consideration if that sale might have been won.

Sub Activities()
'
' Activities Macro
' Macro recorded 18/01/2008 by Allen Robins Intuit Launceston
'
' Keyboard Shortcut: Ctrl+Shift+A
'
Range("G5").Select
ActiveCell.FormulaR1C1 = "lost"
Rows("5:5").Select
Selection.Cut
Sheets("Lost").Select
Rows("4:4").Select
ActiveSheet.Paste
End Sub


"Old_skills_lost" wrote:

Here is what I need to do I have been working on a sales sheet that will
track the sales via a won loss ratio. Now what I have been trying to do is to
take all of the information from the "activity" sheet and copy or perfer move
it to a sheet based as "lost" or "Won" drop down menu.

I don't know the first thing about how to make a macro work automatic once
the menu is used.

There are a total of three sheets to this report what needs to be done. The
activities sheet which will be the only one that employees will be entering
information. The other sheets are won and lost sheet the the information will
be transfered to.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default New user and need help

On Jan 17, 5:02*pm, Old_skills_lost
wrote:
I don't know if this will help, I have recorded a macro. I know it needs fine
tuning as it is only good for that line and it does not take into
consideration if that sale might have been won.

Sub Activities()
'
' Activities Macro
' Macro recorded 18/01/2008 by Allen Robins Intuit Launceston
'
' Keyboard Shortcut: Ctrl+Shift+A
'
* * Range("G5").Select
* * ActiveCell.FormulaR1C1 = "lost"
* * Rows("5:5").Select
* * Selection.Cut
* * Sheets("Lost").Select
* * Rows("4:4").Select
* * ActiveSheet.Paste
End Sub



"Old_skills_lost" wrote:
Here is what I need to do I have been working on a sales sheet that will
track the sales via a won loss ratio. Now what I have been trying to do is to
take all of the information from the "activity" sheet and copy or perfer move
it to a sheet based as "lost" or "Won" drop down menu.


I don't know the first thing about how to make a macro work automatic once
the menu is used.


There are a total of three sheets to this report what needs to be done. The
activities sheet which will be the only one that employees will be entering
information. The other sheets are won and lost sheet the the information will
be transfered to.- Hide quoted text -


- Show quoted text -


hello try this
Sub try()

Dim cell As Range
Sheets("Activities").Activate
For Each cell In Range("E2:E50")
If cell.Text = "won" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Won").Activate
Range("A65536").End(xlUp).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
Else
If cell.Text = "lost" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Lost").Activate
Range("A65536").End(xlUp).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
End If
End If
Next cell

End Sub
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default New user and need help

Wow lookss great but when put into place I get a run-time error '9':
subscript out of range

Thank you for you help

"GTVT06" wrote:

On Jan 17, 5:02 pm, Old_skills_lost
wrote:
I don't know if this will help, I have recorded a macro. I know it needs fine
tuning as it is only good for that line and it does not take into
consideration if that sale might have been won.

Sub Activities()
'
' Activities Macro
' Macro recorded 18/01/2008 by Allen Robins Intuit Launceston
'
' Keyboard Shortcut: Ctrl+Shift+A
'
Range("G5").Select
ActiveCell.FormulaR1C1 = "lost"
Rows("5:5").Select
Selection.Cut
Sheets("Lost").Select
Rows("4:4").Select
ActiveSheet.Paste
End Sub



"Old_skills_lost" wrote:
Here is what I need to do I have been working on a sales sheet that will
track the sales via a won loss ratio. Now what I have been trying to do is to
take all of the information from the "activity" sheet and copy or perfer move
it to a sheet based as "lost" or "Won" drop down menu.


I don't know the first thing about how to make a macro work automatic once
the menu is used.


There are a total of three sheets to this report what needs to be done. The
activities sheet which will be the only one that employees will be entering
information. The other sheets are won and lost sheet the the information will
be transfered to.- Hide quoted text -


- Show quoted text -


hello try this
Sub try()

Dim cell As Range
Sheets("Activities").Activate
For Each cell In Range("E2:E50")
If cell.Text = "won" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Won").Activate
Range("A65536").End(xlUp).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
Else
If cell.Text = "lost" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Lost").Activate
Range("A65536").End(xlUp).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
End If
End If
Next cell

End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default New user and need help

Was able to fix error, but now when it is ran it does not do anything am I
missing something?

"Old_skills_lost" wrote:

Wow lookss great but when put into place I get a run-time error '9':
subscript out of range

Thank you for you help

"GTVT06" wrote:

On Jan 17, 5:02 pm, Old_skills_lost
wrote:
I don't know if this will help, I have recorded a macro. I know it needs fine
tuning as it is only good for that line and it does not take into
consideration if that sale might have been won.

Sub Activities()
'
' Activities Macro
' Macro recorded 18/01/2008 by Allen Robins Intuit Launceston
'
' Keyboard Shortcut: Ctrl+Shift+A
'
Range("G5").Select
ActiveCell.FormulaR1C1 = "lost"
Rows("5:5").Select
Selection.Cut
Sheets("Lost").Select
Rows("4:4").Select
ActiveSheet.Paste
End Sub



"Old_skills_lost" wrote:
Here is what I need to do I have been working on a sales sheet that will
track the sales via a won loss ratio. Now what I have been trying to do is to
take all of the information from the "activity" sheet and copy or perfer move
it to a sheet based as "lost" or "Won" drop down menu.

I don't know the first thing about how to make a macro work automatic once
the menu is used.

There are a total of three sheets to this report what needs to be done. The
activities sheet which will be the only one that employees will be entering
information. The other sheets are won and lost sheet the the information will
be transfered to.- Hide quoted text -

- Show quoted text -


hello try this
Sub try()

Dim cell As Range
Sheets("Activities").Activate
For Each cell In Range("E2:E50")
If cell.Text = "won" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Won").Activate
Range("A65536").End(xlUp).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
Else
If cell.Text = "lost" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Lost").Activate
Range("A65536").End(xlUp).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
End If
End If
Next cell

End Sub



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default New user and need help

OK i am starting to get this.... Fixed the not working issue. Thank you for
all of your help!!!

Now how would I enter a line into that if I only wanted all the lines that
are being transfer from the "activities" page to both "won" and "lost" below
line 4?

"Old_skills_lost" wrote:

Was able to fix error, but now when it is ran it does not do anything am I
missing something?

"Old_skills_lost" wrote:

Wow lookss great but when put into place I get a run-time error '9':
subscript out of range

Thank you for you help

"GTVT06" wrote:

On Jan 17, 5:02 pm, Old_skills_lost
wrote:
I don't know if this will help, I have recorded a macro. I know it needs fine
tuning as it is only good for that line and it does not take into
consideration if that sale might have been won.

Sub Activities()
'
' Activities Macro
' Macro recorded 18/01/2008 by Allen Robins Intuit Launceston
'
' Keyboard Shortcut: Ctrl+Shift+A
'
Range("G5").Select
ActiveCell.FormulaR1C1 = "lost"
Rows("5:5").Select
Selection.Cut
Sheets("Lost").Select
Rows("4:4").Select
ActiveSheet.Paste
End Sub



"Old_skills_lost" wrote:
Here is what I need to do I have been working on a sales sheet that will
track the sales via a won loss ratio. Now what I have been trying to do is to
take all of the information from the "activity" sheet and copy or perfer move
it to a sheet based as "lost" or "Won" drop down menu.

I don't know the first thing about how to make a macro work automatic once
the menu is used.

There are a total of three sheets to this report what needs to be done. The
activities sheet which will be the only one that employees will be entering
information. The other sheets are won and lost sheet the the information will
be transfered to.- Hide quoted text -

- Show quoted text -

hello try this
Sub try()

Dim cell As Range
Sheets("Activities").Activate
For Each cell In Range("E2:E50")
If cell.Text = "won" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Won").Activate
Range("A65536").End(xlUp).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
Else
If cell.Text = "lost" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Lost").Activate
Range("A65536").End(xlUp).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
End If
End If
Next cell

End Sub

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default New user and need help

On Jan 17, 8:11*pm, Old_skills_lost
wrote:
OK i am starting to get this.... Fixed the not working issue. Thank you for
all of your help!!!

Now how would I enter a line into that if I only wanted all the lines that
are being transfer from the "activities" page to both "won" and "lost" below
line 4?



"Old_skills_lost" wrote:
Was able to fix error, but now when it is ran it does not do anything am I
missing something?


"Old_skills_lost" wrote:


Wow lookss great but when put into place I get a run-time error '9':
subscript out of range


Thank you for you help


"GTVT06" wrote:


On Jan 17, 5:02 pm, Old_skills_lost
wrote:
I don't know if this will help, I have recorded a macro. I know it needs fine
tuning as it is only good for that line and it does not take into
consideration if that sale might have been won.


Sub Activities()
'
' Activities Macro
' Macro recorded 18/01/2008 by Allen Robins Intuit Launceston
'
' Keyboard Shortcut: Ctrl+Shift+A
'
* * Range("G5").Select
* * ActiveCell.FormulaR1C1 = "lost"
* * Rows("5:5").Select
* * Selection.Cut
* * Sheets("Lost").Select
* * Rows("4:4").Select
* * ActiveSheet.Paste
End Sub


"Old_skills_lost" wrote:
Here is what I need to do I have been working on a sales sheet that will
track the sales via a won loss ratio. Now what I have been trying to do is to
take all of the information from the "activity" sheet and copy or perfer move
it to a sheet based as "lost" or "Won" drop down menu.


I don't know the first thing about how to make a macro work automatic once
the menu is used.


There are a total of three sheets to this report what needs to be done. The
activities sheet which will be the only one that employees will be entering
information. The other sheets are won and lost sheet the the information will
be transfered to.- Hide quoted text -


- Show quoted text -


hello try this
Sub try()


Dim cell As Range
* * Sheets("Activities").Activate
* * For Each cell In Range("E2:E50")
* * If cell.Text = "won" Then
* * cell.Select
* * Rows(cell.Row).Cut
* * Sheets("Won").Activate
* * Range("A65536").End(xlUp).Select
* * Selection.Insert Shift:=xlDown
* * Application.CutCopyMode = False
* * Sheets("Activities").Activate
* * Else
* * If cell.Text = "lost" Then
* * cell.Select
* * Rows(cell.Row).Cut
* * Sheets("Lost").Activate
* * Range("A65536").End(xlUp).Select
* * Selection.Insert Shift:=xlDown
* * Application.CutCopyMode = False
* * Sheets("Activities").Activate
* * End If
* * End If
* * Next cell


End Sub- Hide quoted text -


- Show quoted text -


here you go, try this. I added comments to the help you identify the
code I added so you can cut and paste it into the code your currently
using that works:

Sub try()

Dim cell As Range
Sheets("Activities").Activate
For Each cell In Range("E2:E50")
If cell.Text = "won" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Won").Activate
Range("A65536").End(xlUp).Select
'Added from here
Do Until Selection.Row = 5
If Selection.Row < 5 Then Selection.Offset(1, 0).Select
Loop
'To here
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
Else
If cell.Text = "lost" Then
cell.Select
Rows(cell.Row).Cut
Sheets("Lost").Activate
Range("A65536").End(xlUp).Select
'And from here
Do Until Selection.Row = 5
If Selection.Row < 5 Then Selection.Offset(1, 0).Select
Loop
'To here
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Sheets("Activities").Activate
End If
End If
Next cell


End Sub
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
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
User form ComboBox Items: Remember user entries? [email protected] Excel Programming 0 March 29th 07 06:41 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
How to: Make user click End User License Agreement acceptance jasonsweeney[_21_] Excel Programming 7 January 30th 04 01:41 AM


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