OscarSuarez27
New Member
- Joined
- May 8, 2019
- Messages
- 2
Good morning.
I'm new using Macros and have no idea about programming, if anyone could please help me with this I will appreciate it:
1. I receive workbooks from a customer disputing some charges, sometimes the workbooks came with just one sheet, sometimes they came with 20 sheets but they always include a column which first row text is "Credit". I'm needing a code that can l[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]oop through all worksheets in the workbook, sum entire "Credit"
I looked up on Microsoft website and I found the code to [FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Loop through all worksheets but have no idea how to do de rest.
[/FONT]<strike>
</strike>
I'm new using Macros and have no idea about programming, if anyone could please help me with this I will appreciate it:
1. I receive workbooks from a customer disputing some charges, sometimes the workbooks came with just one sheet, sometimes they came with 20 sheets but they always include a column which first row text is "Credit". I'm needing a code that can l[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]oop through all worksheets in the workbook, sum entire "Credit"
column
in each sheet (the first cell always has text "Credit" but depending on customer, row number could vary from 50 to 500 and column could vary from B to W) put results into a new brand new sheet with the sheet name and the column sum result.I looked up on Microsoft website and I found the code to [FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Loop through all worksheets but have no idea how to do de rest.
[/FONT]<strike>
Code:
</strike>[/SUP][/SUB][/U][/I][/B][LEFT][COLOR=#333333][FONT=monospace]Sub WorksheetLoop()
' Declare Current as a worksheet object variable.
Dim Current As Worksheet
' Loop through all of the worksheets in the active workbook.
For Each Current In Worksheets
' Insert your code here.
' So I guess that here will be the code select the column by looking for the first cell text (which has the header title), sum the numbers after the first cell until the last one with data on it
[LEFT][COLOR=#333333][FONT=monospace] ' And then put the results into a brand new sheet that includes the sheet name and the W column sum result[/FONT][/COLOR][/LEFT]
Next
End Sub[/FONT][/COLOR][/LEFT][B][I][U][SUB][SUP]<strike>
</strike>
thank you for your help!
[/FONT]