Extracting certain cells from excel files in a specified directory

I am a VBA novice and I am trying to write a code that will copy the following data from multiple csv files all stored in the same directory. I need it to open each csv file Check IF Row 8 in columns H through CA for any cells that have the value ="TotalLMP" (Sample: Cell H8="TotalLMP") THEN copy the value from both Row 7 and Row 19 of any columns that have that value ="TotalLMP" in Row 8 in two new columns (Sample: SINCE H8="TotalLMP", COPY H7="100" AS COLUMN A, COPY H19 = "26.437" AS COLUMN B) THEN copy the value from cell $A$9 in a third column (Sample: COPY A9="20100101" AS COLUMN C") after finishing loop through each csv file close and go to next Then in the new active worksheet in the blank excel file would store each value as follows: .......A .............. B ................ C 1 .. 100 .... 26.437 .... 20100101 2 .. 200 .... 26.585 .... 20100101
If you have any existing code you should include that in your question - even if it doesn't work. Just posting a requirement, without any indication you've tried to solve it yourself, often leads to questions being closed.

以上就是Extracting certain cells from excel files in a specified directory的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » excel

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准