Académique Documents
Professionnel Documents
Culture Documents
files all at once using a formula or a macro? a4:c26 sheet3 into one notepad file,
f4:h26 sheet3 into a second notepad file, etc.
Answer:
This amended code will use tabs instead of commas and will use the value as it is
formatted in the cell.
Sub ExportToNotepad()
End Sub
Next lngCol
Next lngRow
oFSTS.Close
End Sub
How can I simulate the creation of an array formula thru VBA code?
Situation:
My function needs to output an array of values and each cell of the output should have the formula
{=MyFunction(B10,A10,C15)}, so that if I change any parameter of my function, (for example: If I change B10 to
B12) each value of the array should automatically recalculate it's value as well as modify it's formula to reflect the
change.
Answer:
What you really want is unclear to me, but with this you might get it to work the way you want:
Worksheets("Sheet1").Range("A1").Formula = "=$A$4+$A$10"
Answer:
Sub try_array()
Dim data As Variant
data = Range("A2:A6").Value
Range("C2:C6").Value = data
End Sub
ok?
For example, the following doesn't work to get data placed in the
requested cells (or anywhere on a the active spreadsheet).
End function
Is there something I have to put into or call from within the function
to get it to work as I'd like or what am I missing?
Answer:
That looks to be fine as long as R and C are valid and the array was set-up
properly. You do need to give sheet names somewhere, i'm assuming you have
this function in a module.
This is how I did it, I don't like names like data either, it will be bad
too often.
For i = 0 To cnt - 1
Cells(r, c) = myData(i, 1)
r=r+1
Next