I basically try to put a formula in a macro, but the I didn't able to get it to run.
I use these 2 formulas
=text(string, "00000"), I put the rept() into the 00000 part.
=rept(0, 6), and I put the invoiceLenCount part into the 6, So, it makes the length of the output based on user input.
the formula works without the sub of Rept() part, but after I put in the Rept part, the macros breaks. Please help
Thank,![]()
Cells(i, temp1lastCol + 6).Formula = "=text(""" & invoice + i - 2 & """, ""Rept(0, """ & invoiceLenCount & """)"")"
Bookmarks