Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Advance "paste to" cell by row to create a list

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How Do I Get Out Of "DATA" ~ "CREATE LIST"? Gatsby Excel Discussion (Misc queries) 6 January 28th 07 07:01 PM
cannot use "Create List" and "Share Workbook" same time Devendra Excel Discussion (Misc queries) 0 October 26th 06 06:05 AM
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM


All times are GMT +1. The time now is 01:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"