+ Reply to Thread
Results 1 to 5 of 5

applying macro code to a range of cells

  1. #1
    Registered User
    Join Date
    12-26-2009
    Location
    Baghdad
    MS-Off Ver
    Excel 2003
    Posts
    4

    Question applying macro code to a range of cells

    hi there
    how can i do the following using VBA
    making each cell in column A added to each cell in column B and the result will be in the column C
    for example
    c1=A1+B1
    c2=A2+B2
    c3=A3+B3
    ... etc

    i know i can do that simply without vba code but I just want to use this method to implement more complex formulas .
    thanx in advance

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: applying macro code to a range of cells

    Hi just-gal
    Try this code
    Please Login or Register  to view this content.
    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    12-26-2009
    Location
    Baghdad
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: applying macro code to a range of cells

    thank you for answering
    but what if I wanted to be in limted range for example the code will be implemented from c1 to c6 ?

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: applying macro code to a range of cells

    Hi just-gal
    If you know the range (don't need to look for it), simply change this line of code from
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    John

  5. #5
    Registered User
    Join Date
    12-26-2009
    Location
    Baghdad
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: applying macro code to a range of cells

    thanx alot
    and happy new year

+ 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