View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
muddan madhu muddan madhu is offline
external usenet poster
 
Posts: 747
Default Transferring data

And for getting the total of invoice

in Cell J5 put this formula and drag it down
=IF(C5="",IF(C5C6,C5,J4),C5)

and now in cell I5 put this formula and drag it down
=SUMIF($J$5:$J$15,C5,$H$5:$H$15)

If u want you can hide the column J.



On Feb 22, 1:55*am, muddan madhu wrote:
to transfer the data according to Agent, run the below macro.

Please add the sheets with all the agent names mentioned in the main
sheet.
i.e., Attached file has sheets main,W,Q,R and T was missing please add
before running this macro.

Note : in the main sheet cell D5 has W and D6 blank once run this
macro, in Cell D6 W will placed.
Try this one, get back if you any errors.

Sub group()
Range("D5").Select
rng1 = Cells(Rows.Count, "e").End(xlUp).Row
For a = 5 To rng1
* *If ActiveCell.Value < "" Then
* * * *temp = ActiveCell.Value
* *Else
* * * *ActiveCell.Value = temp
* *End If
If Cells(a, 4) = temp Then
* *Rows(a).Copy
* *Sheets(temp).Select
* *rng = Cells(Rows.Count, "d").End(xlUp).Row
* *Cells(rng + 1, 1).Select
* *ActiveSheet.Paste
* *Sheets("main").Select
Else
* *End If
Cells(a + 1, 4).Select
Next
Application.CutCopyMode = False
End Sub

And for getting the total of invoice

in Cell

On Feb 21, 11:56*pm, tofimoon4
wrote:

Dear sir,this is my first post to your distinct forum hopping i reach
the ultimate solution because i have sent many messages to different
forums with no replies, i have a workbook with main sheet and about (10)
agents sheets , the main has columns like( date,inv.no,agent name,code
no.,quan.,price,cost,total amount ) ,i enter the data in these columns
daily,what i want from your goodself ( the way can i use to transfer
these data to the agents sheets which contain all above except (agent
column) automatically by ( formula or code) ,i am using excel 2003 and
enclosed herewith an example.
Thanks in advance.


+-------------------------------------------------------------------+
|Filename: sheets2.zip * * * * * * * * * * * * * * * * * * * * * * *|
|Download:http://www.thecodecage.com/forumz/attachment.php?attachmentid=81|
+-------------------------------------------------------------------+


--
tofimoon4
------------------------------------------------------------------------
tofimoon4's Profile:http://www.thecodecage.com/forumz/member.php?userid=138
View this thread:http://www.thecodecage.com/forumz/sh...ad.php?t=67250