none
Count Code not working RRS feed

  • Question

  • I am using code to auto drag the column cells "14BD" until "14IN" starts and drag 14IN until 14PK Starts. but facing issue. It was dragging 14BD until last cell of column.. Please Help me regarding this.

    Private Sub CommandButton1_Click()

    Dim i As Integer
    Dim cnt As String
     i = 3

    Do Until i = 21991
    Cells(i, 3).Value = "14 BD"
        
         i = i + 1
    Loop


    End Sub


    Saniv Sharma

    Monday, July 18, 2016 1:34 PM

Answers

All replies

  • If "ABB Project XX XX" is only used in the headers, then try

    Sub Test()
        With Range("C2:C" & Cells(Rows.Count, "B").End(xlUp).Row)
            .Formula = "=IF(NOT(ISERROR(FIND(""ABB Project"",B2))),MID(B2,FIND(""ABB Project"",B2)+12,LEN(B2)),C1)"
            .Value = .Value
        End With
    End Sub

    Monday, July 18, 2016 6:39 PM
  • Hi Saniv Sharma,

    First we notice that your code and the picture you had post are saying us totally different from each other.

    like if see the code then we can understand that in column"C" it will assign the value "14 BD" from 3 to 21991.

    if we see the picture then we can notice that the column "C" having multiple type of values like 14BD, 14IN, 14 PK and only had a selection till 856.

    the other thing you had mentioned that you want to drag the value 14BD till 14IN. did you mean you want to select the column till there or you want to assign the value till there? we can see that already different values are assigned.

    I think I have misunderstanding. so can you please clear it so that we can try to provide you a better suggestion.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 19, 2016 12:51 AM
    Moderator
  • Thanks Brernie... Its working for me

    Saniv Sharma

    Tuesday, July 19, 2016 8:04 AM
  • Thanks Deepak,,,

    Both the files are same but there was some filtration done for different work..


    Saniv Sharma

    Tuesday, July 19, 2016 8:05 AM
  • HI Deepak

    can you help me through picking this Site IDs, These are on Column "C" of my Plan, I just want to pick only ID's and want to put them on new column(Column "L" or "M". on its front. Eg:-(9AAE10395)

    It looks like this:-

    (Site 9AAE103925/JPHIM) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101214/JPHIJ) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101096/JPMSM) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101529/JPUKB1) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101211/JPOTG) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101095/JPSHO) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE103820/JPTYO) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101668/JPTYO2) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101213/JPKUK) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101215/JPFUK) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE101210/JPNGO) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE103009/JPSDJ) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE103022/JPOSA) Implementation -Assumed 2 days interval after previous site migration
    (Site 9AAE103792/JPFUK1) Implementation -Assumed 2 days interval after previous site migration


    Saniv Sharma

    Tuesday, July 19, 2016 11:05 AM
  • Hi Saniv Sharma,

    the issue you had mentioned in the last post is a new question and it is not related with original post.

    your original issue had been solved.

    you can ask only one question in one thread. so if you have a new question instead of continuing in current thread start a new thread for every new question.

    so here I would recommend you to create a new thread and try to help to close this thread by mark the suggestion as an answer that helped you to solve your issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 20, 2016 5:18 AM
    Moderator