Page 6 of 11 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 102

Thread: VBA Copy Rows From One Workbook To text csv File Based On Count In Different Workbook. Cross Posted Chaos

  1. #51
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    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

  2. #52
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    240
    Rep Power
    7
    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
    Last edited by sandy666; 05-06-2020 at 08:27 PM.
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

  3. #53
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Chill Sandy tc & have a great day

  4. #54
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Trying to explain the problem
    Code:
    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
    this code provides incorrect output in csv file
    oncorrect output is attached plz see
    Attached Images Attached Images

  5. #55
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    the correct output is uploaded plz see i need this result in csv
    Attached Images Attached Images

  6. #56
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Quote Originally Posted by fixer View Post
    My dream is to become a Speculator ...
    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
    Last edited by DocAElstein; 05-07-2020 at 02:59 PM.

  7. #57
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    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
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by fixer; 05-07-2020 at 04:18 PM.

  8. #58
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    240
    Rep Power
    7
    Quote Originally Posted by fixer View Post
    Important plz see thi post i tried to mentioned all details correctly easy to understand
    plz see
    & plz create a 2.csv file from ur end bcoz it ia completely blank and in the forum i cannot upload the 2.csv file
    so create a csv file name it 2.csv file
    Could you write posts without slang shortcuts?
    Maybe this is a reason why we don't understand what are you trying to achieve
    so...

    btw. to me Ur was Sumerian city-state in ancient Mesopotamia
    Last edited by sandy666; 05-07-2020 at 04:15 PM.
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

  9. #59
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    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)
    Last edited by fixer; 05-07-2020 at 04:30 PM.

  10. #60
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    240
    Rep Power
    7
    Quote Originally Posted by fixer View Post
    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)
    I see you did not understand.
    use: you, answers, because, please, your, yours and so on...
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

Similar Threads

  1. Replies: 4
    Last Post: 04-10-2014, 10:58 PM
  2. Replies: 2
    Last Post: 09-18-2013, 12:30 AM
  3. TO convert Excel entire workbook in csv format
    By pritee in forum Excel Help
    Replies: 11
    Last Post: 08-16-2013, 11:28 AM
  4. Replies: 4
    Last Post: 06-20-2013, 04:25 PM
  5. Replies: 9
    Last Post: 09-09-2011, 02:30 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •