Friday, 15 May 2015

Insert formula into cells using excel vba -


I'm trying to follow, but it's not working. ? From unparsed

  sub parse_dates_flurry () 'How many columns as dim col_diff integer: the  offset  to cause a problem 

Here what I have on col_diff = integer num_of_char = 10 dim sheet_name_flurry string sheet_name_flurry = "flurry_an_output.csv" as num_of_char dim-20 sheet as long as the lines used in dim rows1 rows1 = Get_Rows_Generic (sheet_name_flurry, 1) ' Find the last column and fill the formula with dim formula_parse string formula_parse = "= left (RC [Col_dif], num_of_char) " 'dim starting_cell_range range worksheet with as long as Ann as dim (sheet_name_flurry) set starting_cell_range = .Range (find_last_column (sheet_name_flurry)) starting_cell_range.Offset (0, 1) =" parse date error to = 1 (rows1 - 1) for "n getting here: starting_cell_range.Offset (N, 1) .Formula = formula_parse Next n end finished with Sub

  formula_parse = "= Left (RC [col_dif], num_of_char)"  
< P> should be like this:

  formula_parse = "= LEFT (rc [" & amp; Col_dif & amp; "]," & Amp; Num_of_char & amp; ")"  

Remember that formula_parse is a form of wire that is correct. In order to categorize the value of a variable, you have to do it like 'you up'.
and since you are passing a formula in R1C1 notation, replace this line:

  start_cell_range.offset (n, 1). Formula = Formula_pera  

To:

  start_cell_range.Offset (n, 1). Formula 1C1 = Formula_preel  

No comments:

Post a Comment