Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Advanced users please look! - MACRO help Needed!


Hi All,

Thank you for looking at my problem, hope you can help!!!

What I need to do…..

From the table below the first column shows the product number
(2001079, 2001196 and 2001219), in the end column shows how many times
the product has been sold (-1, -2, -2 etc) Underneath is an empty box
which I need subtotalled. I need a way which can subtotal all the
products and then list the products on a different page, only showing
the product number and the total sold.

E.g. the example would be:
2001079 3
2001196 6
2001219 27

But this is easier said than done! Im told I need a macro created or
maybe a relationship formula set up but I am unable to create such a
complex formula.

CAN ANYONE PLEASE HELP?


2001079 FOP 5.0 CL G 3210x2250 LS 22
201 GI for cost ce 1 -1
201 GI for cost ce 1 -2

2001196 FOP 6.0 BZ G 3210x2250 LS 18
201 GI for cost ce 1 -2
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1

2001219 -27 FOP 6.0 CL G 2100x1100 LS 35
201 GI for cost ce 1 -4
201 GI for cost ce 1 -4
201 GI for cost ce 1 -4
201 GI for cost ce 1 -3
201 GI for cost ce 1 -2
201 GI for cost ce 1 -2
201 GI for cost ce 1 -6
201 GI for cost ce 1 -2


--
pauldaddyadams
------------------------------------------------------------------------
pauldaddyadams's Profile: http://www.excelforum.com/member.php...o&userid=22499
View this thread: http://www.excelforum.com/showthread...hreadid=392095

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Advanced users please look! - MACRO help Needed!

Sub Test()
Dim iLastRow As Long
Dim i As Long
Dim sCode
Dim nAmount

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
sCode = Range("A1").Value
nAmount = 0
For i = 2 To iLastRow + 1
If Cells(i, "A").Value = "" Then
Cells(i, "A").Value = sCode
Cells(i, "G").Value = nAmount
nAmount = 0
sCode = Cells(i + 1, "A").Value
i = i + 1 ' skip next line
Else
nAmount = nAmount - Cells(i, "G").Value
End If
Next i

End Sub


--
HTH

Bob Phillips

"pauldaddyadams"
<pauldaddyadams.1t4ymg_1122984355.5946@excelforu m-nospam.com wrote in
message news:pauldaddyadams.1t4ymg_1122984355.5946@excelfo rum-nospam.com...

Hi All,

Thank you for looking at my problem, hope you can help!!!

What I need to do...

From the table below the first column shows the product number
(2001079, 2001196 and 2001219), in the end column shows how many times
the product has been sold (-1, -2, -2 etc) Underneath is an empty box
which I need subtotalled. I need a way which can subtotal all the
products and then list the products on a different page, only showing
the product number and the total sold.

E.g. the example would be:
2001079 3
2001196 6
2001219 27

But this is easier said than done! Im told I need a macro created or
maybe a relationship formula set up but I am unable to create such a
complex formula.

CAN ANYONE PLEASE HELP?


2001079 FOP 5.0 CL G 3210x2250 LS 22
201 GI for cost ce 1 -1
201 GI for cost ce 1 -2

2001196 FOP 6.0 BZ G 3210x2250 LS 18
201 GI for cost ce 1 -2
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1

2001219 -27 FOP 6.0 CL G 2100x1100 LS 35
201 GI for cost ce 1 -4
201 GI for cost ce 1 -4
201 GI for cost ce 1 -4
201 GI for cost ce 1 -3
201 GI for cost ce 1 -2
201 GI for cost ce 1 -2
201 GI for cost ce 1 -6
201 GI for cost ce 1 -2


--
pauldaddyadams
------------------------------------------------------------------------
pauldaddyadams's Profile:

http://www.excelforum.com/member.php...o&userid=22499
View this thread: http://www.excelforum.com/showthread...hreadid=392095



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Advanced users please look! - MACRO help Needed!


Thank you for getting back to me!!

I am not sure how to act on your reply, is that a VBA script or macro?
How do i go about executing what you said to try?

Paul


--
pauldaddyadams
------------------------------------------------------------------------
pauldaddyadams's Profile: http://www.excelforum.com/member.php...o&userid=22499
View this thread: http://www.excelforum.com/showthread...hreadid=392095

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Advanced users please look! - MACRO help Needed!

Check out Pivot Tables. They do a nice job of this.

Also - you can record what you are doing and find a way for
Excel to automatically make or adjust a Pivot Table.

--
steveB

Remove "AYN" from email to respond
"pauldaddyadams"
<pauldaddyadams.1t4ymg_1122984355.5946@excelforu m-nospam.com wrote in
message news:pauldaddyadams.1t4ymg_1122984355.5946@excelfo rum-nospam.com...

Hi All,

Thank you for looking at my problem, hope you can help!!!

What I need to do...

From the table below the first column shows the product number
(2001079, 2001196 and 2001219), in the end column shows how many times
the product has been sold (-1, -2, -2 etc) Underneath is an empty box
which I need subtotalled. I need a way which can subtotal all the
products and then list the products on a different page, only showing
the product number and the total sold.

E.g. the example would be:
2001079 3
2001196 6
2001219 27

But this is easier said than done! Im told I need a macro created or
maybe a relationship formula set up but I am unable to create such a
complex formula.

CAN ANYONE PLEASE HELP?


2001079 FOP 5.0 CL G 3210x2250 LS 22
201 GI for cost ce 1 -1
201 GI for cost ce 1 -2

2001196 FOP 6.0 BZ G 3210x2250 LS 18
201 GI for cost ce 1 -2
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1
201 GI for cost ce 1 -1

2001219 -27 FOP 6.0 CL G 2100x1100 LS 35
201 GI for cost ce 1 -4
201 GI for cost ce 1 -4
201 GI for cost ce 1 -4
201 GI for cost ce 1 -3
201 GI for cost ce 1 -2
201 GI for cost ce 1 -2
201 GI for cost ce 1 -6
201 GI for cost ce 1 -2


--
pauldaddyadams
------------------------------------------------------------------------
pauldaddyadams's Profile:
http://www.excelforum.com/member.php...o&userid=22499
View this thread: http://www.excelforum.com/showthread...hreadid=392095



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Advanced users please look! - MACRO help Needed!

Go to the VBE (ALt-F11), create a code module (InsertModule), copy the code
in, go back to Excel, and run the macro (ToolsMacroMacros..., select the
macro and Run).

--
HTH

Bob Phillips

"pauldaddyadams"
<pauldaddyadams.1t59rd_1122998802.3092@excelforu m-nospam.com wrote in
message news:pauldaddyadams.1t59rd_1122998802.3092@excelfo rum-nospam.com...

Thank you for getting back to me!!

I am not sure how to act on your reply, is that a VBA script or macro?
How do i go about executing what you said to try?

Paul


--
pauldaddyadams
------------------------------------------------------------------------
pauldaddyadams's Profile:

http://www.excelforum.com/member.php...o&userid=22499
View this thread: http://www.excelforum.com/showthread...hreadid=392095



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
Advanced IF Formula help needed EileenR Excel Discussion (Misc queries) 3 July 8th 09 06:08 PM
Advanced Sum or marco needed???? JMK Excel Worksheet Functions 4 November 4th 07 01:38 AM
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) shadestreet Excel Discussion (Misc queries) 2 July 21st 06 03:04 PM
Good books for Excel advanced users cyberdude Excel Discussion (Misc queries) 1 March 10th 06 08:32 AM
How do I enable simultaneous excel workbook users to use advanced. HJHSmith Excel Programming 0 January 13th 05 08:29 PM


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