Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cols R and U contain formulas till row 200. I need a sub to freeze cols R and
U from row 4 to the last row of data in col Q (taken from bottom up). Col Q contains only data, no formulas. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Max, try the below in activesheet
Sub Macro() Dim lngRow As Long lngRow = Cells(Rows.Count, "Q").End(xlUp).Row Cells.Locked = False Range("Q4:R" & lngRow).Locked = True ActiveSheet.Protect Password:="password" End Sub -- Jacob (MVP - Excel) "Max" wrote: Cols R and U contain formulas till row 200. I need a sub to freeze cols R and U from row 4 to the last row of data in col Q (taken from bottom up). Col Q contains only data, no formulas. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, what I meant by "freeze" was to convert the formulas in cols R and U
to values (copy paste special as values). What should be changed in the sub to do that? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Columns("R") = columns("R").value Columns("U") = columns("U").value -- Jacob (MVP - Excel) "Max" wrote: Sorry, what I meant by "freeze" was to convert the formulas in cols R and U to values (copy paste special as values). What should be changed in the sub to do that? Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, but I'm not sure how to adapt those lines to suit the desired
"freeze" extent, ie only from row 4 down to the last row of data in col Q, not the entire col. Grateful if you could take a moment to piece it together |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK. Try the below
Sub Macro() Dim lngRow As Long lngRow = Cells(Rows.Count, "Q").End(xlUp).Row Range("R4:R" & lngRow) = Range("R4:R" & lngRow).Value Range("U4:U" & lngRow) = Range("U4:U" & lngRow).Value End Sub -- Jacob (MVP - Excel) "Max" wrote: Thanks, but I'm not sure how to adapt those lines to suit the desired "freeze" extent, ie only from row 4 down to the last row of data in col Q, not the entire col. Grateful if you could take a moment to piece it together |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Enhance sub to copy cols of variable length into 1 col to snake results into other cols | Excel Programming | |||
2 Cols To 2 Cols VLookup Comparison | Excel Discussion (Misc queries) | |||
Range.Select 1st pass 13 cols, 2nd paqss 25 cols twice as wide in error? | Excel Programming | |||
Cond Format:re color 2 cols, skip 2 cols | Excel Worksheet Functions | |||
Improvement to sub: Detect data extent and convert to values | Excel Programming |