Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I am trying to write a code in VB that will copy and paste a formula's
result into a list based on the variable entered. How do you paste the results to an output that would advance the cell incrementally by row? (I cannot simply drag down the formula, the output value must be pasted) End objective: Input variable list has corresponding Output Formula Value list Please see current code below: Thanks in advance, Ryan My code so far: Col A-list of integer variables, B1-input integer, B3-formula (based off B1), Col C - output in a list form; Please note: Cannot program output Col C as formula Sub A() ' For Each DATA In Worksheets("Sheet1").Range("A1:A25").Cells DATA.Select Selection.Copy Range("B1").Select ActiveSheet.Paste Range("B3").Select Application.CutCopyMode = False Selection.Copy Range("C1").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Next ' this code will paste the formulas result in C1 over the previous variables result ' End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How Do I Get Out Of "DATA" ~ "CREATE LIST"? | Excel Discussion (Misc queries) | |||
cannot use "Create List" and "Share Workbook" same time | Excel Discussion (Misc queries) | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) |