Consulting

Results 1 to 2 of 2

Thread: looping help for copying data from a range and paste in another cell

  1. #1

    looping help for copying data from a range and paste in another cell

    Hi,

    I have dashboard , which is calculated based on the value entered in cell B2. I enter the country name there and the entire dashboard populates, after it populates i move the sheet to a new workbook and converts them into values and save the file.
    i have about 50 countires, so i have to do this 50 times.

    I can easily record/write a macro for moving, converting n saving as a different file, i need your help for a macro which run this like a loop.

    for example i will save all 50 countries name in sheet 2 Column A ( starts from A2) so if a macro copies each values from there ans paste in sheet 1 B2, then run my code for all these 50 countries.

    Thanks for your help in advance.

    cross post : http://www.mrexcel.com/forum/excel-q...ther-cell.html

    Regards
    Arvind

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Coding steps, you can convert as yyiu say you can easily create VBA

    Get lastrow of country list
    Loop all rows of country list (For i = 1 to countrylist.lastrow)

    Move country to cell B2

    Populate dashboard

    Move values

    save file

    Next country
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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