Bro No Doubt in it I have created the same bro
But i am not having knowledge about vba
I am learner
in 9 months I cant be a masters of vba
Printable View
Bro No Doubt in it I have created the same bro
But i am not having knowledge about vba
I am learner
in 9 months I cant be a masters of vba
so ask Alan to create vba with the result in worksheet not csv
and don't ask me about vba
I just tried to explain some rules in Excel
Chill Sandy tc & have a great day
Trying to explain the problem
this code provides incorrect output in csv fileCode:Sub Step14()
Dim w1 As Workbook, w2 As Workbook, w3 As Workbook
Set w1 = Workbooks.Open("C:\Users\WolfieeeStyle\Desktop\1.xls")
Set w2 = Workbooks.Open("C:\Users\WolfieeeStyle\Desktop\2.csv")
Set w3 = Workbooks.Open("C:\Users\WolfieeeStyle\Desktop\3.xlsx")
Dim Ws1 As Worksheet, Ws2 As Worksheet, Ws3 As Worksheet
Set Ws1 = w1.Worksheets.Item(1)
Set Ws2 = w2.Worksheets.Item(1)
Set Ws3 = w3.Worksheets.Item(1)
Dim Lc3 As Long, Lenf1 As Long, Lr1 As Long
Let Lr1 = Ws1.Range("A" & Ws1.Rows.Count & "").End(xlUp).Row
Let Lc3 = Ws3.Cells.Item(1, Ws3.Columns.Count).End(xlToLeft).Column
Dim Lc3Ltr As String
Let Lc3Ltr = "K"
Let Lenf1 = Lr1 - 1
Dim rngOut As Range: Set rngOut = Ws2.Range("A1:" & Lc3Ltr & Lenf1 & "")
Ws2.Cells.NumberFormat = "General"
Let rngOut.Value = "='[3.xlsx]" & Ws3.Name & "'!A$1"
Let rngOut.Value = rngOut.Value
Let rngOut.Value = Evaluate("If({1},SUBSTITUTE(" & rngOut.Address & ", ""0"", """"))")
Dim rngIn As Range
Set rngIn = Ws3.Range("A1:" & Lc3Ltr & "1")
rngIn.Copy
rngOut.PasteSpecial Paste:=xlPasteValues
w1.Close
w2.Save
Let Application.DisplayAlerts = False
w2.Close
Let Application.DisplayAlerts = True
w3.Close
End Sub
oncorrect output is attached plz see
the correct output is uploaded plz see i need this result in csv
This will be very difficult for you to achieve your dream if you cannot speak English. In this world, you will not achieve very much if you cannot master the English language!!
The biggest problem remains. You are incapable of communicating with us. You either ignore us, or you do not understand most of what we write and do for you.
You are totally incapable of telling us what you want.
It is impossible for us to understand you, because you can not communicate in English.
Sandy is probably getting close to guessing what you want: He is very clever, he can almost read your mind…
Your current question seems to be related to opening a file with Excel.
Your current question seems to be related to opening a text file and displaying it in a particular format in Excel
But I am not sure.
Everything that you write makes no sense in English.
For today, I will just try again to explain what is different file types here:
https://excelfox.com/forum/showthrea...ll=1#post13248
https://excelfox.com/forum/showthrea...ll=1#post13247
That is all I am doing for you today
This is all that I am doing for you today.
Tomorrow I will look in again to see if you have managed to tell us in English language what you want.
Alan
Important plz see this post & i tried to mentioned all details correctly( easy to understand ) plz see
& plz create a 2.csv file from ur end bcoz it is completely blank and in the forum i cannot upload the 2.csv file, so create a csv file & name it 2.csv file
I corrected the same sandy sir
now run the macro and see the output
have u got the output as attached in that post(Correctoutput.png)?
Now there are 2 ans of this question
1)Yes(yes is not possible bcoz that macro has issue with pasting of the data)
2)No(If No then correct the macro so that it can provide me the desired result)