Hello,
I'm just starting to understand a little bit of visual basic, and need a bit of assistance with making this formula run much faster and not do thousands of unnecessary calculations.
Here's the code I currently have:
My spreadsheet contains anywhere from 100 rows to 20,000 but when running this formula I'm ending up with over 50,000 cells with 0 value which are not needed. So first question is how to make the formula stop when the entire row is blank as I do have some values in K column which are blank but i don't want the formula to stop there.
Any assistance would be greatly appreciated, and I hope to receive comments on the lines so I can understand what each line is for.
I'm just starting to understand a little bit of visual basic, and need a bit of assistance with making this formula run much faster and not do thousands of unnecessary calculations.
Here's the code I currently have:
Code:
Sub Insert_Len()
'Inserting a Column at Column AS
Range("AS1").EntireColumn.Insert
'Inserting a formula at Column AS
Range("AS:AS").Formula = "=LEN(K:K)"
End Sub
My spreadsheet contains anywhere from 100 rows to 20,000 but when running this formula I'm ending up with over 50,000 cells with 0 value which are not needed. So first question is how to make the formula stop when the entire row is blank as I do have some values in K column which are blank but i don't want the formula to stop there.
Any assistance would be greatly appreciated, and I hope to receive comments on the lines so I can understand what each line is for.
Last edited by a moderator: