+ Reply to Thread
Results 1 to 9 of 9

VBA for loop required - this will be peanuts for the experts in this forum

  1. #1
    Registered User
    Join Date
    04-05-2017
    Location
    Malta
    MS-Off Ver
    Excel 2010
    Posts
    24

    VBA for loop required - this will be peanuts for the experts in this forum

    All,

    I need a vba code which i probably can do after spending 2 days researching, trial and error but my boss wants a job done ASAP so im reaching out for your help.

    I included an attachment which i guess is the best way for me to explain what i'm after.

    So essentially the figures in the black box in the workings worksheet are linked to cell starting D4 in the worksheet List.

    The agent name in the worksheet 'working' will change according to the agent number in cell D2

    The logic that i am after is
    - in the worksheet workings Cell D2 is first set as one and the values in the worksheet List from cell range D4 to L4 is copied in cell starting B4
    - in the worksheet 'workings' cell D2 is added by one (the agent name changes with the vlooup, the vlaues in the black box will also change based on logic that i will build)
    - again the values in the worksheet list from cell range D4 to L4 is copied in the next row below the previous agent data so this would be B8.

    The loop would stop based on an initial number that the user inputs. So if i have (say) 100 agents i would key in 100 and the loop would stop at 100.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA for loop required - this will be peanuts for the experts in this forum

    Probably I can't help you with your VBA question.

    Maybe I don't understand the question, but the sheet "Working" seems to be filled in manualy.

    Or is it filled with extern data?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    04-05-2017
    Location
    Malta
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: VBA for loop required - this will be peanuts for the experts in this forum

    The data in the black box will be based on logic that i will build

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA for loop required - this will be peanuts for the experts in this forum

    If it is a manualy input, why not manuly input it in sheet List?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VBA for loop required - this will be peanuts for the experts in this forum

    Do you want to update when you change Working!D2?

    To Working sheet code module
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-05-2017
    Location
    Malta
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: VBA for loop required - this will be peanuts for the experts in this forum

    Yes i would like it to update whenever D2 changes and that needs to be a loop

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VBA for loop required - this will be peanuts for the experts in this forum

    Did you try the code?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-05-2017
    Location
    Malta
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: VBA for loop required - this will be peanuts for the experts in this forum

    When i go to view macros i dont see anything there, i need to see the code as i need to tweak it as my model is much more complicated than that

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VBA for loop required - this will be peanuts for the experts in this forum

    Ahhh, Now I think I understand how you want it.
    Please Login or Register  to view this content.
    Last edited by jindon; 05-26-2022 at 08:11 AM.

+ 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. Would like to know about the Forum Experts/Gurus
    By ImranBhatti in forum The Water Cooler
    Replies: 69
    Last Post: 03-28-2017, 12:44 PM
  2. Replies: 1
    Last Post: 12-28-2016, 12:38 PM
  3. Replies: 1
    Last Post: 07-22-2015, 10:45 PM
  4. Hello Excel Forum Experts...
    By Catsense13 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 02-19-2015, 04:25 PM
  5. Hello Excel Forum Experts and Users!
    By mom2carisa in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-04-2013, 11:49 AM
  6. Send Mail Code Required **Please help experts**
    By radfal in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-20-2012, 07:30 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