Drag-down formula VBA

Arctor

New Member
Joined
Feb 22, 2016
Messages
5
Hello everyone, newbie here, please be gentle.

I have a dataset from columns D to R that constantly gets updated with more rows of data. I have a set of calculation formulas in columns A-C and S-Z.

Is it possible to have a macro that would look at the last non-empty cell in column A, and populate it for however many new rows of data are there, and then do the same thing for the other columns, essentially a drag-down formula ( I don't know whether this would need a repeat process for every column or can even be done in one go?)

Your help is much appreciated, thank you
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hello everyone, newbie here, please be gentle.

I have a dataset from columns D to R that constantly gets updated with more rows of data. I have a set of calculation formulas in columns A-C and S-Z.

Is it possible to have a macro that would look at the last non-empty cell in column A, and populate it for however many new rows of data are there, and then do the same thing for the other columns, essentially a drag-down formula ( I don't know whether this would need a repeat process for every column or can even be done in one go?)

Your help is much appreciated, thank you

couple questions.

under what circumstances do you want this macro to run? Do you want it to run every time you open the workbook? only when you push a button?

When the data is entered into columns D-R there is no data added to A-C or S-Z correct?

Could you please supply each of the formulas and which column they are to be entered?

Thanks,
 
Upvote 0
Thank you for your reply. Yes, you are correct, first the data in the middle columns is introduced, then the formulas would be dragged-down pressing a button

Column A =VALUE(D1727)
Column B =VALUE(G1727&H1727)
Column C =VALUE(L1727)

Data D-R

Column S =SUMIF(B:B,B1727,R:R)
Column T =IF(R1727<0,"Credit","Debit")
Columns U, V blank
Column W =IF(S1727>0,"Net Debit", "Net Credit")
Column X =IF(DATEDIF(DATE(YEAR($A1727),MONTH($A1727),1),$X$2,"m")=0,"0-30 Days",IF(DATEDIF(DATE(YEAR($A1727),MONTH($A1727),1),$X$2,"m")=1,"30-60 Days","60+ Days"))
Column Y =VLOOKUP(C1727,'Names'!$A$1:$C$1000,3,FALSE)
Column Z =TEXT(D1727,"MMM-YY")



Thanks for your help
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,261
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top