Automatically Copy Formatting & Formulas to New Rows

ALdair

New Member
Joined
Dec 5, 2017
Messages
6
I'm working on building a table that needs to be quite flexible regarding its size.

I've figured out how to make columns appear and collapse as needed by some variables, but not automatically... yet. I'm stuck on being able to add new rows dynamically without just having a massive block of 200 rows with formatting and formulas that eat up printing paper. Is there a way to automatically copy formulas & formatting from the row about when I start entering a name into a new row?

Put into a picture:

Formatted Row: Name Name PII PII PII Data Data Data Data Data
Empty Row: Empty Empty Empty Empty Empty Empty Empty <- Need this row to copy the formula & formatting of the row above when I start filling in the names.

Thanks for any suggestions.
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

mrshl9898

Well-known Member
Joined
Feb 6, 2012
Messages
1,623
Click on the table and press ctrl+T this will turn it into a table.

As soon as you type in a new row and hit enter or tab etc, it will copy down formulas from above
 

ALdair

New Member
Joined
Dec 5, 2017
Messages
6
Wow.... No one is to discuss how many hours I spent trying to write code to solve this. Much appreciated.

In a related note, I'm trying to get the following macro to function. It's to automatically open & collapse the columns based on entries in the C column. The Hide/Show Macros function fine but the automatic component is stubborn.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("C1:C200"), Range("Target.Address") Is Nothing Then
Call Hide_Zeroed_Columns
End If
End Sub


Sub Hide_Zeroed_Columns()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Intersect(ActiveSheet.UsedRange, Range("1:1"))
cell.EntireColumn.Hidden = cell.Value = 0 And Not IsEmpty(cell)
Next cell
Application.ScreenUpdating = True
End Sub




Sub Show_All_Columns()
Columns.Hidden = False
End Sub
 

mrshl9898

Well-known Member
Joined
Feb 6, 2012
Messages
1,623
May need a new thread for that one mate, I struggle at times with Private Sub Worksheet_Change
 

Watch MrExcel Video

Forum statistics

Threads
1,122,464
Messages
5,596,288
Members
414,052
Latest member
Dual Showman

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
Top