Results 1 to 5 of 5

Thread: VB code using excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    2

    Question VB code using excel

    hi i am having doubt in excel vb codes

    have to create a code

    My excel contains
    Sheet 1:
    Column A : Pink and No colors
    Column B : some datas like A2, B2....(If A2 is applicable then pink color is applied in column A or else no color)
    Sheet 2:
    Column A : Pink and No colors
    Column B : some datas like A3, B3....(If A3 is applicable then pink color is applied in column A or else no color)
    Sheet 3:
    Column A : Pink and No colors
    Column B : some datas like A1, B1....(If A1 is applicable then pink color is applied in column A or else no color)



    step 1 : Open any excel file
    step 2 : apply filter
    step 3 : removed all the rows having no fill(color)
    step 4 : Copy column B remaining datas into new excel
    step 5 : similarly copy all Sheets 1 2 3 datas into that new excel


    Could anyone able to provide solution/code for this?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: VB code using excel

    Welcome to VBForums

    Thread moved from the 'VB.Net' forum to the 'Office Development/VBA' forum.

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VB code using excel

    Column A : Pink and No colors
    Column B : some datas like A2, B2....(If A2 is applicable then pink color is applied in column A or else no color)
    Sheet 2:
    Column A : Pink and No colors
    Column B : some datas like A3, B3....(If A3 is applicable then pink color is applied in column A or else no color)
    Sheet 3:
    Column A : Pink and No colors
    Column B : some datas like A1, B1....(If A1 is applicable then pink color is applied in column A or else no color)
    a2 = b2 or what criteria?
    does that have to be in order 2,3,1? or do you just want all rows tested and coloured individually, it does not seem to be explicit about what you want to do

    can you post a sample workbook (zip first)
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    2

    Re: VB code using excel

    ATTACHED file for your reference

  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VB code using excel

    ATTACHED
    err no!!
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width