![]() |
Fill the formulas at adjacent columns by VBA
I import data from a text file and put it at Column A to Column F (by macro
with using €śEdit text import€ť and €śFill down formulas with columns adjacent to data€ť at Data Range Property), and the formula is from Column G to J. However, the data in Column F is not always filled, sometimes it is blanked. Therefore the formulas from column G to J is sometimes missing, how to fix it by VBA. |
Fill the formulas at adjacent columns by VBA
I would like to help, but need more info on how your populating the cells in
A through F. Would you be willing to either post your code or email it directly to Sincerely, Christmas May "Angus" wrote: I import data from a text file and put it at Column A to Column F (by macro with using €śEdit text import€ť and €śFill down formulas with columns adjacent to data€ť at Data Range Property), and the formula is from Column G to J. However, the data in Column F is not always filled, sometimes it is blanked. Therefore the formulas from column G to J is sometimes missing, how to fix it by VBA. |
Fill the formulas at adjacent columns by VBA
I use macro to record "edit text import" and make the path as ImportFile:
Dim ImportFile As String ImportFile = MyPath & LastFile ActiveWorkbook.Sheets("Data").Select Range("A2").Select With Selection.QueryTable .Connection = "TEXT;" & ImportFile .TextFilePlatform = 1252 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _ 1, 1, 1, 1, 1, 1, 1, 1) .TextFileTrailingMinusNumbers = True .TextFilePromptOnRefresh = False .Refresh BackgroundQuery:=False End With "Christmas May" wrote: I would like to help, but need more info on how your populating the cells in A through F. Would you be willing to either post your code or email it directly to Sincerely, Christmas May "Angus" wrote: I import data from a text file and put it at Column A to Column F (by macro with using €śEdit text import€ť and €śFill down formulas with columns adjacent to data€ť at Data Range Property), and the formula is from Column G to J. However, the data in Column F is not always filled, sometimes it is blanked. Therefore the formulas from column G to J is sometimes missing, how to fix it by VBA. |
All times are GMT +1. The time now is 05:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com