Not typical copy and paste questions

%3CLINGO-SUB%20id%3D%22lingo-sub-1865535%22%20slang%3D%22en-US%22%3ENot%20typical%20copy%20and%20paste%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1865535%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20a%20way%20to%20have%20a%20spreadsheet%2C%20that%20is%20set%20up%20already%20with%20formulas%20and%20some%20cells%20protected%2C%20and%20then%20when%20I%20copy%20to%20a%20new%20page%2C%20it%20transfers%20the%20data%2C%20clears%20the%20unprotected%20cells%20and%20carries%20over%20the%20formulas%20so%20that%20all%20I%20have%20to%20do%20is%20hit%20copy%20and%20the%20date%20is%20changed%20and%20invoice%20numbers%20are%20changed%2C%20etc%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1865535%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1865691%22%20slang%3D%22en-US%22%3ERe%3A%20Not%20typical%20copy%20and%20paste%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1865691%22%20slang%3D%22en-US%22%3EHi%2C%20it%20sounds%20like%20quite%20a%20complex%20series%20of%20steps%20that%20would%20require%20you%20to%20share%20some%20screenshots%20and%20examples%20for%20us%20to%20understand%20and%20advise%20properly.%20However%2C%20on%20first%20impressions%20it%20sounds%20like%20you'd%20need%20some%20custom%20VBA%20code%20written%20to%20achieve%20what%20you%20would%20like%20to%20do.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1865800%22%20slang%3D%22en-US%22%3ERe%3A%20Not%20typical%20copy%20and%20paste%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1865800%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3BI%20have%20attached%20one%20that%20is%20filled%20out%20and%20the%20other%20one%20that%20has%20the%20comments%20written%20on%20it%20so%20it%20will%20show%20what%20I%20want%20to%20see%20if%20can%20be%20done.%20Thank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1866066%22%20slang%3D%22en-US%22%3ERe%3A%20Not%20typical%20copy%20and%20paste%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1866066%22%20slang%3D%22en-US%22%3EThese%20screen%20shots%20are%20not%20enough%20to%20find%20%26amp%3B%20fix%20the%20issue%2C%2C%20if%20possible%20please%20share%20the%20workbook%20with%20us%2C%20and%20let%20us%20examine!!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1866308%22%20slang%3D%22de-DE%22%3ESubject%3A%20Not%20typical%20copy%20and%20paste%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1866308%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F861962%22%20target%3D%22_blank%22%3E%40tpadkins%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EWith%20the%20permission%20of%20all%20involved%2C%20here%20is%20a%20small%20proposal%20for%20a%20solution%20with%20VBA%20.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E(not%20tested%2C%20but%20should%20work)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ESub%20SheetClone()%0A%20%20%20%20Dim%20ws%20As%20Worksheet%2C%20wsClone%20As%20Worksheet%2C%20r%20as%20Range%2C%20col%20as%20range%0A%20%20%20%20Set%20ws%20%3D%20Sheets(1)%0A%20%20%20%20With%20ws%0A%20%20%20%20%20%20%20%20.Copy%20After%3A%3Dws%0A%20%20%20%20%20%20%20%20Set%20wsClone%20%3D%20Sheets(ws.Index%20%2B%201)%0A%20%20%20%20%20%20%20%20wsClone.Name%20%3D%20ws.Name%20%26amp%3B%20%22_copy%22%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20For%20Each%20col%20In%20.UsedRange.Columns%0A%20%20%20%20%20%20%20%20%20%20%20%20wsClone.Columns(col.Column).ColumnWidth%20%3D%20col.ColumnWidth%0A%20%20%20%20%20%20%20%20Next%0A%20%20%20%20%20%20%20%20For%20Each%20r%20In%20.UsedRange.Rows%0A%20%20%20%20%20%20%20%20%20%20%20%20wsClone.Rows(r.Row).RowHeight%20%3D%20r.RowHeight%0A%20%20%20%20%20%20%20%20Next%0A%20%20%20%20End%20With%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3ENikolino%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EI%20know%20that%20I%20know%20nothing%20(Socrates)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Is there a way to have a spreadsheet, that is set up already with formulas and some cells protected, and then when I copy to a new page, it transfers the data, clears the unprotected cells and carries over the formulas so that all I have to do is hit copy and the date is changed and invoice numbers are changed, etc

8 Replies
Highlighted
Hi, it sounds like quite a complex series of steps that would require you to share some screenshots and examples for us to understand and advise properly. However, on first impressions it sounds like you'd need some custom VBA code written to achieve what you would like to do.
Highlighted

@Wyn Hopkins I have attached one that is filled out and the other one that has the comments written on it so it will show what I want to see if can be done. Thank you

Highlighted
These screen shots are not enough to find & fix the issue,, if possible please share the workbook with us, and let us examine!!
Highlighted

@tpadkins 

 

With the permission of all involved, here is a small proposal for a solution with VBA .

(not tested, but should work)

 

Sub SheetClone()
    Dim ws As Worksheet, wsClone As Worksheet, r as Range, col as range
    Set ws = Sheets(1)
    With ws
        .Copy After:=ws
        Set wsClone = Sheets(ws.Index + 1)
        wsClone.Name = ws.Name & "_copy"
        
        For Each col In .UsedRange.Columns
            wsClone.Columns(col.Column).ColumnWidth = col.ColumnWidth
        Next
        For Each r In .UsedRange.Rows
            wsClone.Rows(r.Row).RowHeight = r.RowHeight
        Next
    End With
End Sub

 

I would be happy to know if I could help.

 

Nikolino

I know that I know nothing (Socrates)

Highlighted

@tpadkins 

Could you simply copy the worksheet?

 

 

Note: If you use defined names (I never reference data other than by name), then it is best to use names scoped to the sheet.

Highlighted

@Wyn Hopkins Thank you and let me know if you don't understand and can't put the screen shots together with the spreadsheet. The 10-30-20 is the beginning day, it carries over to 10-31-20 where the grayed in cells are inputted each day with new numbers. Then the bottom 2 cells of numbers transfers over to the new sheet/day and then new numbers are put in there. The example of that is the 11-02-20.

Highlighted

Hi @tpadkins 

 

My approach to this would be to have a single input sheet with the date in column A and just keep running the table down the page.

 

Your reporting can then be done on a different page using a Pivot Table or something like SUMIFS / INDEX MATCH / XLOOKUP

 

Splitting the inputs onto daily pages seems to overcomplicate things (from an outsider perspective)

Highlighted

@tpadkins 

If you wish to retain the format of a daily form (as opposed to a database table with the ability to generate a report for any given day) then I think that the best way forward is to have an unpopulated sheet as a template (possibly hidden) which is cloned to produce a new form for each day.

VBA could be used to create and name the new sheet, as well as any Tables you choose to introduce, and would link the volumes brought forward to the amounts carried forward from the previous sheet.