cjyogz
08-16-2006, 09:27 PM
Hello everyone. Here is my situation.
I am writing a bit of code to summarize the total cost of a certain product for the total Month. There is a sheet called Summary which has all the products on it, and a sheet called Income, which has the total Income recieved for each item.
What i want to do, is for eg, on Screen1(link below to screen shot) there is a list of products. Lets start with Ball Money. I want the program to collect the value of Ball Money, it needs to store the name as a text, and the cell location.
It will then go to the Income sheet (Screen2(link below)) where it will search column C3 and downwards for the matching word of Ball Money. When it finds the word Ball Money, it will then go to the corresponding cell in Column E, where it will add the value in that Cell to a variable Cost(or whicever you choose). After adding this value to the variable Cost, it will then return to column C, where it will continue to search down Column C for anymore matching cells matching Ball Money, where it will again, add the value to the variable Cost.
After it has gone down the the list and gets to an empty cell, (ActiveCell.Value = "") it will then return to the Summary Sheet (Screen1) and move down one cell (ActiveCell.Offset (1, 0).Select) where it will store the value in this cell over the top of Ball Money, so in this case Bar Sales, it will then do the same process as what was done with Ball Money.
If you can just do this for the Income part of the Summary Sheet(Screen1) that would be great, i will be able to modify the code to go to the expense sheet.
Thank you very much for reading this, and i hope you can help me with this situation. Ask any questions and i will answer asap.
Chris J
http://www.rapidupload.com/d.php?file-dl&filepath=15813
Screen 1 ^
http://www.rapidupload.com/d.php?file=dl&filepath=15815
Screeb 2 ^
I am writing a bit of code to summarize the total cost of a certain product for the total Month. There is a sheet called Summary which has all the products on it, and a sheet called Income, which has the total Income recieved for each item.
What i want to do, is for eg, on Screen1(link below to screen shot) there is a list of products. Lets start with Ball Money. I want the program to collect the value of Ball Money, it needs to store the name as a text, and the cell location.
It will then go to the Income sheet (Screen2(link below)) where it will search column C3 and downwards for the matching word of Ball Money. When it finds the word Ball Money, it will then go to the corresponding cell in Column E, where it will add the value in that Cell to a variable Cost(or whicever you choose). After adding this value to the variable Cost, it will then return to column C, where it will continue to search down Column C for anymore matching cells matching Ball Money, where it will again, add the value to the variable Cost.
After it has gone down the the list and gets to an empty cell, (ActiveCell.Value = "") it will then return to the Summary Sheet (Screen1) and move down one cell (ActiveCell.Offset (1, 0).Select) where it will store the value in this cell over the top of Ball Money, so in this case Bar Sales, it will then do the same process as what was done with Ball Money.
If you can just do this for the Income part of the Summary Sheet(Screen1) that would be great, i will be able to modify the code to go to the expense sheet.
Thank you very much for reading this, and i hope you can help me with this situation. Ask any questions and i will answer asap.
Chris J
http://www.rapidupload.com/d.php?file-dl&filepath=15813
Screen 1 ^
http://www.rapidupload.com/d.php?file=dl&filepath=15815
Screeb 2 ^