+ Reply to Thread
Results 1 to 25 of 25

Issues w/t Application Match

  1. #1
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Issues w/t Application Match

    Greetings,
    I am trying to use Application Match but my code is not working. I get a run-time error '438 - object doesn't support this property or method.
    Debug lands on "y = Application.Match(ST1.Cells(x, 1).ST2.Cells("A:A"), 0)" line of code.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Issues w/t Application Match

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    shg,
    Thank you much for your responce.
    Now I am getting a Run-time error5 on same line of code.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Issues w/t Application Match

    Change Cells to Range for ST2

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Issues w/t Application Match

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    I changed the line of code as you both suggested. However, the information from ST1 is not being copied to ST2.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Issues w/t Application Match

    How about
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    Fluff13,
    Thank you much!. Still not working. Let me work with it a little longer.

  9. #9
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    I am attaching a sample workbook for clarification.
    Attached Files Attached Files

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Issues w/t Application Match

    Can you please explain in words, what you are trying to?

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Issues w/t Application Match

    Does this do what you want?

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    Fluff13,
    I want to copy cell values from worksheet to worksheet.
    Ex:
    Worksheet "to" A:A contains unique numbers. Starting with row 3.
    Worksheet "from" A:A contains unique numbers. Starting with row 2. Copy the cell values B:B and C:C to worksheet "to" matching the unique numbers within A:A.

  13. #13
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    shg,
    Thank you much! I just noticed my sample workbook is incorrect. As well as my explanation in my previous post. *Working too many hours!!!
    The columns on worksheet "to" are not next to each other. Columns O and Columns P are the columns the data needs to be copied to.

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Issues w/t Application Match

    How about just showing an example of the desired result?

  15. #15
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    Okay see attached.
    Attached Files Attached Files

  16. #16
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Issues w/t Application Match

    Please Login or Register  to view this content.

  17. #17
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this !


    According to the attachment (but cell to!A2 must be empty) an easy Excel starter demonstration :

    PHP Code: 
    Sub Demo1()
       Const 
    ",FALSE),"""")"
         
    Dim F$
             
    "=IFERROR(VLOOKUP($A3," Sheet16.[A1].CurrentRegion.Address(External:=True) & ","
        
    With Sheet15.[A3].CurrentRegion.Offset(, 14).Resize(, 2)
            .
    Formula = Array("2" S"3" S)
            .
    Formula = .Value2
            
    .Columns(5).Formula "5" S
            
    .Columns(5).Formula = .Columns(5).Value2
        End With
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 01-10-2020 at 07:17 PM. Reason: optimization …

  18. #18
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    Marc L,
    WOW!!!! The code you provided has an incredible speed!!!
    I am needing to modify the code a bit. If I run into an issue, I will reach out.
    Again, thank you much!!!

    shg,
    Thank you as well!

  19. #19
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Thanks for the rep' !

    My demo just respects the TEBV main rule : Think Excel Before VBA ! Here just an easy Excel Basics formula …

  20. #20
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    Marc L,
    You have provided direction for something I was not aware of!!! I have spent most of the night working with your code. Is it possible to keep the cell format from the original worksheet (Sheet16)?

  21. #21
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    According to your last attachment there is no cell format issue on my side …

    As this procedure uses an Excel formula so the original cell format is retained but you can amend the format even by code.

  22. #22
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    Marc L,
    I have revised the workbook. I want to keep the cell format on "from" worksheet.
    Last edited by brentjohn; 01-11-2020 at 10:44 AM.

  23. #23
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    Sorry I posted the wrong workbook in my previous post. Please see the attached.
    Attached Files Attached Files

  24. #24
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Lightbulb

    'cause of Item#4 the Range.Copy method keeps the cell format as well (like shg did in his code) :

    PHP Code: 
    Sub Demo2()
        
    Dim VRg As RangeW
            V 
    Sheet16.[A1].CurrentRegion.Columns(1).Value2
            Application
    .ScreenUpdating False
        
    For Each Rg In Sheet15.[A3].CurrentRegion
                W 
    Application.Match(Rg.Value2V0)
            If 
    IsNumeric(WThen
                Sheet16
    .Rows(W).Columns("B:C").Copy Rg(115)
                
    Sheet16.Cells(W5).Copy Rg(119)
            
    End If
        
    Next
            Application
    .ScreenUpdating True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  25. #25
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Issues w/t Application Match

    Marc L,
    Thank you much!!!!! Works great!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Application.Calculation issues
    By c.davidson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2018, 06:52 AM
  2. Application.OnTime Huge Issues
    By sparx in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-10-2016, 05:44 AM
  3. Application.GetSaveAsFilename Issues on MAC
    By jblack6572 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2015, 12:57 PM
  4. Application.Onkey issues
    By skb_yfc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2015, 09:56 PM
  5. Issues with Application.DisplayAlert = False
    By euro_andres in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-25-2012, 05:34 PM
  6. Application.Match... or Application.WorksheetFunction.Match ...
    By SDruley in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2011, 11:34 AM
  7. Excel 2003 Application Issues
    By ExcelJamie in forum Excel General
    Replies: 0
    Last Post: 09-07-2006, 12:04 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1