ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help to adjust code (https://www.excelbanter.com/excel-programming/317899-help-adjust-code.html)

SiouxieQ

Help to adjust code
 
Hi there,

I have the sumif code below entered into a macro in a large worksheet. My
problem is that the column I need to sum the value of (C[19]) changes. c[41]
contains months of the year in one column, whereas the sheet I get
information from has 2 column of data one for each month.

Can anyone think of a way to adjust this code to move over a column to look
at values when there is a change in month in C[41], Without doing a big long
if statement for twelve months?
ActiveCell.FormulaR1C1 = _
"=SUMIF('Paste data GL'!C[41],RC[2],'Paste data GL'!C[19])"

Cheers Sue



All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com