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.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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
 
Upvote 0
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
 
Upvote 0
May need a new thread for that one mate, I struggle at times with Private Sub Worksheet_Change
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,851
Members
449,051
Latest member
excelquestion515

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