首先,我仍在学习excel VBA,似乎我想咬的东西超出了我在这里可以咀嚼的范围。我试图搜索我的问题,但找不到与我最接近的问题。
所以,我有一个csv数据集,如下所示:
date,"0000000000","SAO","32","Description","5000","REF"
date,"0000000000","SAO","32","Reversal from
\nDescription","-5000","REF"
date,"0000000000","SAO","32","Description","10000","REF"
我希望数据看起来像这样:
date,"0000000000","SAO","32","Description","5000","REF"
date,"0000000000","SAO","32","Reversal from Description","-5000","REF"
date,"0000000000","SAO","32","Description","10000","REF"
手动是如此简单,但是有超过3000行需要更正,所以我需要使这个问题自动化。我尝试录制宏,但是没有用。
需要完成的步骤是: 1.搜索“ \ n” 我相信这可以做到吗?
set result = Find(What:="\n", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
date,"0000000000","SAO","32","Description","5000","REF"
date,"0000000000","SAO","32","Reversal from \nDescription","-5000","REF"
date,"0000000000","SAO","32","Description","10000","REF"
我不知道如何执行此操作,请帮忙?
谢谢