Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This is probably a really simple question but I haven't been able to find the
right VBA language to make it happen yet. I have a report that I need to add a formula to in column "C". I want this formula to be copied into each cell in column "C" until there are no more active rows. Then I want to highlight the cells that I just filled with the formula, copy them and paste special (values). Here's what I have so far. It looks like it will only handle the absolute range of "C3:C93". Any ideas? Range("C3").Select Selection.AutoFill Destination:=Range("C3:C93") Range("C3:C93").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Thanks, Have_Data_Will_Travel |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi
you didn't say what the formula was so i made one up to test. try this.. Dim c As Long c = Cells(Rows.Count, "b").End(xlUp).Row Range("C2").Select Selection.AutoFill Destination:=Range("C2:C" & c) Range("C3:C"& c).Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Post back if questions regards FSt1 "Have_Data_Will_Travel" wrote: This is probably a really simple question but I haven't been able to find the right VBA language to make it happen yet. I have a report that I need to add a formula to in column "C". I want this formula to be copied into each cell in column "C" until there are no more active rows. Then I want to highlight the cells that I just filled with the formula, copy them and paste special (values). Here's what I have so far. It looks like it will only handle the absolute range of "C3:C93". Any ideas? Range("C3").Select Selection.AutoFill Destination:=Range("C3:C93") Range("C3:C93").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Thanks, Have_Data_Will_Travel |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That actually took care of it. I was working with a concatenation formula.
I just took the lines from your example and dropped them into place. Thanks so much!! "FSt1" wrote: hi you didn't say what the formula was so i made one up to test. try this.. Dim c As Long c = Cells(Rows.Count, "b").End(xlUp).Row Range("C2").Select Selection.AutoFill Destination:=Range("C2:C" & c) Range("C3:C"& c).Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Post back if questions regards FSt1 "Have_Data_Will_Travel" wrote: This is probably a really simple question but I haven't been able to find the right VBA language to make it happen yet. I have a report that I need to add a formula to in column "C". I want this formula to be copied into each cell in column "C" until there are no more active rows. Then I want to highlight the cells that I just filled with the formula, copy them and paste special (values). Here's what I have so far. It looks like it will only handle the absolute range of "C3:C93". Any ideas? Range("C3").Select Selection.AutoFill Destination:=Range("C3:C93") Range("C3:C93").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Thanks, Have_Data_Will_Travel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy and Paste of Relative Cell References | Excel Worksheet Functions | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
Named formulas in CHOOSE need to be Relative references when paste | Excel Worksheet Functions | |||
XL2K - Conditional Formatting relative to cell selection | Excel Discussion (Misc queries) | |||
Copy/Paste of QueryTable doesn't adjust relative parameters | Excel Discussion (Misc queries) |