+ Reply to Thread
Results 1 to 10 of 10

Where to look for VBA

  1. #1
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Where to look for VBA

    Good afternoon all

    Today I have spent some time searching the Forum for any thread that may have posted help,
    for " Looking at cells on sheet1 then matching some the data on sheet2 then paste it"
    I looked at about 3 other off this forum site.

    Peter
    One I have learnt over the last few months, " You are NEVER too old to learn ".
    Sometimes I forget to say " Thank You " for your assistance, so here I say " A BIG Thank You. "

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Where to look for VBA

    The problem is that you are not employing the KISS principle.

    What you need to do is split your search into two entities:

    1. Looking up & matching data using VBA.
    2. Copying data from one cell to another specified cell using VBA.

    However, in your case it is far more complex than that, because you need to build in IF conditions, so that would be your third search:

    3. IF conditions using VBA.

    What I tend to do is gather together snippets that do the various bits (building blocks) of what I want to do and test each of them in isolation, then I try to bring them together. It's the same as building a complex formula: you can't write the whole thing in one fell swoop.

    As I have said a zillion times before, take it step-by-step, ONE step at a time.

    You suffer very much from the 'trying to run before you can walk' syndrome, and it's because you don't pare things back to the bare bones and build them up stage by stage. That's why you tie yourself (and us!) in knots. I guess you weren't an engineer before you retired?

    EDIT: Using the forum search isn't very efficient - using Google with ExcelForum as part of the search is actually more effective!
    Last edited by AliGW; 08-18-2019 at 03:06 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: Where to look for VBA

    Good Morning Ali

    I was in the Hearing aid Industry Servicing Audiometers, and Tympanometers, and Building Hearing Aids.

    Basically that's what I looked at today, I have printed about 25 VBA Codes today doing various functions,
    as you said looking for different bits.

    I would like to finalise this project and NOT throw in the towel at the 12 hour.

    A Question has GB changed time My world clock shows it as 08:10??

    Peter

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Where to look for VBA

    Changed time? What do you mean? It's summer over here, so we are on BST - yes, it's 0813 right now.

    So what I suggest you do is create a little practice workbook. Make it as simple as possible.

    Use it to practise using each of the VBA snippets you've found - test each one - choose one that does what you want in terms of the lookup and set it to one side.

    Now do the same thing, but this time focusing entirely on the copy aspect. Test it until it does what you want (e.g. you type X in Sheet1!A1 and X appears in Sheet2!A1).

    Now try to combine the two snippets together.

    Keep building this way.

    EDIT: I think you mean the eleventh hour ...

  5. #5
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: Where to look for VBA

    Hi

    Thank you for that tip, I had not even thought of Trying on Blank sheets.

    Time wise I used to see GB and Antwerp on the same time frame.

    Good Night from me here.

    P

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Where to look for VBA

    No, Antwerp is one hour ahead along with most of western Europe. You have got your time zones wrong!

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Where to look for VBA

    Antwerp is one hour ahead along with most of western Europe
    Is that also something that's going to change after Brexit ?
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  8. #8
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: Where to look for VBA

    My Iphone world clock shows
    GB 08:50
    Antwerp 09:50
    Cape Town 09:50

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Where to look for VBA

    @Rudi

    Not because of Brexit: there has been talk of us moving to summer time permanently for quite a long time, but whether it happens or not remains to be seen.

    I'm not a Brexiteer, but the sooner this protracted separation is over now, the better. We've been in political limbo for an age now - thoroughly fed up of it!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Where to look for VBA

    @Pete - correct. Antwerp, as I said, is one hour ahead of us, not the same time as us, as you suggested in post #5.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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