DrParmeJohnson
New Member
- Joined
- Feb 28, 2019
- Messages
- 44
Hello, I'm quite awful at VBA and am trying to make a macro that does this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]Item#[/TD]
[TD]Item Name[/TD]
[TD]Qty[/TD]
[TD]Total[/TD]
[TD]Tracking[/TD]
[/TR]
[TR]
[TD]1000[/TD]
[TD]xxxx[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]xxxx[/TD]
[/TR]
[TR]
[TD]1000[/TD]
[TD]xxxx[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]xxxx[/TD]
[/TR]
[TR]
[TD]2000[/TD]
[TD]xxxx[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]xxxx[/TD]
[/TR]
</tbody>[/TABLE]
For this format, with the letters on top being default excel columns, I am trying to have the macro go through column E (Item#) and column G (Qty), look for similar Item#'s (i.e 1000) and add up the value in Qty, so for Item# 1000, 3 and output that total in the last cell of the row, in Column H, containing Item# 1000. It would then continue looping through until the end of the Item# column.
I would assume this might be done using like assigned ranges, end of row, and a sum function all bundled into a loop but, I lack the knowledge to do so. So, if someone can assist me in doing this, I would greatly appreciate the assistance.
If there is any need of clarification, as I tend to be bad at explaining things, please do let me know.
Thank you,
DPJ
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]Item#[/TD]
[TD]Item Name[/TD]
[TD]Qty[/TD]
[TD]Total[/TD]
[TD]Tracking[/TD]
[/TR]
[TR]
[TD]1000[/TD]
[TD]xxxx[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]xxxx[/TD]
[/TR]
[TR]
[TD]1000[/TD]
[TD]xxxx[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]xxxx[/TD]
[/TR]
[TR]
[TD]2000[/TD]
[TD]xxxx[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]xxxx[/TD]
[/TR]
</tbody>[/TABLE]
For this format, with the letters on top being default excel columns, I am trying to have the macro go through column E (Item#) and column G (Qty), look for similar Item#'s (i.e 1000) and add up the value in Qty, so for Item# 1000, 3 and output that total in the last cell of the row, in Column H, containing Item# 1000. It would then continue looping through until the end of the Item# column.
I would assume this might be done using like assigned ranges, end of row, and a sum function all bundled into a loop but, I lack the knowledge to do so. So, if someone can assist me in doing this, I would greatly appreciate the assistance.
If there is any need of clarification, as I tend to be bad at explaining things, please do let me know.
Thank you,
DPJ