+ Reply to Thread
Results 1 to 12 of 12

VBA Code to pick up values from cells

  1. #1
    Registered User
    Join Date
    07-15-2015
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    14

    VBA Code to pick up values from cells

    Hi,

    I am looking for a code which basically should pick up the value from cell A1 and paste it to all the cells in X1:X1000. The same should happen for the value from B1, which should be copied to Y1:Y1000.

    How does that work with the "For Each" Code, so that this happens for each worksheet in the excel file?

    Thanks a lot!

  2. #2
    Forum Contributor
    Join Date
    09-26-2014
    Location
    Moscow, Russia
    MS-Off Ver
    MSE 10, MSE 13
    Posts
    179

    Re: VBA Code to pick up values from cells

    Hi there!

    You may use this one, "For Each" included:

    Please Login or Register  to view this content.
    Best wishes and have a nice day!

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: VBA Code to pick up values from cells

    Maybe -

    Please Login or Register  to view this content.
    Last edited by NeedForExcel; 07-20-2015 at 03:25 AM.
    Cheers!
    Deep Dave

  4. #4
    Registered User
    Join Date
    07-15-2015
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    14

    Re: VBA Code to pick up values from cells

    Quote Originally Posted by Rioran View Post
    Hi there!

    You may use this one, "For Each" included:

    Please Login or Register  to view this content.
    Hi,

    this one works perfectly, thanks a lot.

    Is it possible to adjust this code a bit, to just pick up the middle part of the text in the cell A1?

    So something like not just mere copying, but =MID(A1,14,36)?

    Thanks again!

  5. #5
    Forum Contributor
    Join Date
    09-26-2014
    Location
    Moscow, Russia
    MS-Off Ver
    MSE 10, MSE 13
    Posts
    179

    Re: VBA Code to pick up values from cells

    Extract only part of value? Simple as two plus two:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-15-2015
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    14

    Re: VBA Code to pick up values from cells

    That works great.

    Thanks for your help!

  7. #7
    Registered User
    Join Date
    03-19-2015
    Location
    Myanmar
    MS-Off Ver
    2010 Microsoft Office Excel
    Posts
    17

    Question Re: VBA Code to pick up values from cells

    Dear Mr/Mrs
    I am also looking for solution of picking up the date (Not Month/ Nor Year) of a mentioned date. For example, only 14 out of 14-Feb-15. To do so, if a cell is met with one condition, then pick up that 14 only and paste the number into a specific cells.
    Why I want it is that in my office, I want to check whether the staff are late office time or not. If someone was late, then I enter data for him as "Personal Late" (pl) or "On Duty Late" (odl). If either of those two words (pl and odl) appeared in a cell, then I want to pick up the date (e.g 14 from the date mentioned in another cell) and paste it in a cell in separate sheet. If that staff late again in another day, says 16-Feb-15, then again copy 16 and add into the same cell of 14 with comma.
    By doing so, I can see the dates of a month that someone is late office within one cell.
    Please help me.
    [email protected]
    If you need example excel book, I can send you.
    Last edited by Tet Htut Naing; 07-20-2015 at 08:34 AM.

  8. #8
    Registered User
    Join Date
    07-15-2015
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    14

    Re: VBA Code to pick up values from cells

    Quote Originally Posted by Rioran View Post
    Extract only part of value? Simple as two plus two:

    Please Login or Register  to view this content.
    Hi,

    I am using the code as quoted here. It picks up values from certain cells in each tab and pastes it somewhere else.

    Is there a way, to let the makro be more individual? Meaning, that it picks up and pastes certain cells from each tab (as it does), and then go to certain tabs again and copy different cells?

    Tanks for your help!

  9. #9
    Forum Contributor
    Join Date
    09-26-2014
    Location
    Moscow, Russia
    MS-Off Ver
    MSE 10, MSE 13
    Posts
    179

    Re: VBA Code to pick up values from cells

    Hello again!

    VBA is a flexible programming language. If you have stright logic for macro to follow - then everything is possible.

  10. #10
    Registered User
    Join Date
    07-15-2015
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    14

    Re: VBA Code to pick up values from cells

    Hi,

    thanks for your response. Unfortunately I do not know much about coding.

    Just as an example: What would be the adjustments to the code above, if it needs to go back to Tab "XYZ" and copy cell a15 into column Z1 to Z100? (after it went through each tab before, of course)

    Thanks.

  11. #11
    Forum Contributor
    Join Date
    09-26-2014
    Location
    Moscow, Russia
    MS-Off Ver
    MSE 10, MSE 13
    Posts
    179

    Re: VBA Code to pick up values from cells

    Is it what you are looking for?

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    07-15-2015
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    14

    Re: VBA Code to pick up values from cells

    Yes, absolutely. Thanks so much!

+ 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. Creating a forumula to pick up values in other cells...
    By wench02 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2015, 08:34 AM
  2. [SOLVED] I need to set ranges for Unique values, then from those ranges pick random cells...
    By Darth269 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2014, 04:45 PM
  3. Replies: 2
    Last Post: 03-09-2013, 04:30 AM
  4. Replies: 0
    Last Post: 02-26-2013, 05:08 AM
  5. search will not pick up cells values that are hyperlinked
    By Tony Vargo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2008, 10:02 AM
  6. Range selection-How do I use vb code to pick up
    By Sagaron in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2005, 07:08 AM
  7. [SOLVED] The VBA code for solver does not pick up 'change cells' and 'set .
    By vineet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2005, 03:06 PM

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