Posts by sktneer
-
-
You're welcome Ape!
-
You're welcome! Glad it worked as desired.
-
-
-
You should declare the Public Boolean variable DisableX on a Standard Module.
And where do you change the value of DisableX? Is it ever set to be True? Otherwise it will remain False and you cannot close the workbook. -
You're welcome!
-
Please find the attached with two codes on Report Sheet Module.
1) The Sheet Activate Code will insert a drop down list based on values in column F on Dump Sheet i.e. unique location codes.
2) The Change Event Code will populate the relevant data once you select a location code in E2 -
So do you want to select the location code in E2 on Report tab and macro to show the relevant data under TPI Summay?
-
Please upload a small sample workbook with a layout which is similar to the layout of your original file and mock up the desired output on another sheet to visualize the end output you are trying to achieve.
-
You're welcome Michael!
-
-
You're welcome!
ws2.Range("A" & Rows.Count).End(3)(2) is equivalent to ws2.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).
-
You may try something like this...
Code
Display MoreSet rng1 = ws1.Range(ws1.Cells(2, 4), ws1.Cells(lr1, 4)) Set rng2 = ws1.Range(ws1.Cells(2, 5), ws1.Cells(lr1, 5)) rng1.Copy ws2.Range("A2") rng2.Copy ws2.Range("A" & Rows.Count).End(3)(2) With ws2 .Range("A1").Value = "Lista med Domare" .Range("A1").Font.Bold = True .Range("A1").CurrentRegion.RemoveDuplicates Columns:=1, Header:=xlYes .Columns(1).AutoFit End With
-
-
-
Please give this a try...
Code
Display MoreSub CopyToArchive() Dim sws As Worksheet, dws As Worksheet Dim tbl As ListObject Application.ScreenUpdating = False Application.DisplayAlerts = False Set sws = Sheets("DRS REGISTER") Set tbl = sws.ListObjects(1) Set dws = Sheets("ARCHIVE") sws.AutoFilterMode = False With tbl.Range .AutoFilter field:=11, Criteria1:="YES" If tbl.Range.Columns(11).SpecialCells(xlCellTypeVisible).Cells.Count > 1 Then tbl.DataBodyRange.SpecialCells(xlCellTypeVisible).Copy dws.Range("A" & Rows.Count).End(3)(2).PasteSpecial xlPasteValues tbl.DataBodyRange.SpecialCells(xlCellTypeVisible).Delete End If tbl.Range.AutoFilter field:=11 End With Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub
Click the button called "Copy To Archive " on DRS Register Sheet to run the code.
[ATTACH]n1207666[/ATTACH]
-
phill6815
You will need a change event code to achieve that. Please open a new question with your requirement. -
Upload your file here to see why it is not working.
-