+ Reply to Thread
Results 1 to 9 of 9

Add and Replace columns on Different Sheet

  1. #1
    Registered User
    Join Date
    09-28-2021
    Location
    san Francisco, California
    MS-Off Ver
    2010
    Posts
    32

    Add and Replace columns on Different Sheet

    Hi

    I am trying to create a Macro where it will look at row 6 Sheet 1 and if finds "A" (which may be multiple columns) add those columns together and put the total on Sheet 2 column B. If row 6 has "B" add those columns together and put on Sheet 2 Column C.

    Any help is greatly appreciated!

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,530

    Re: Add and Replace columns on Different Sheet

    Re: "add those columns together"
    Do you want to sum the total found A's and B's in Row 6?

  3. #3
    Registered User
    Join Date
    09-28-2021
    Location
    san Francisco, California
    MS-Off Ver
    2010
    Posts
    32

    Re: Add and Replace columns on Different Sheet

    Thanks for getting back to me, thank you and I should have been more clear. I would like all the columns with "A" which may have twenty rows end up on Sheet 2 with the sum of all the rows in column B.

    So a quick example:

    Sheet 1 Sheet 2 Column B

    A A A

    1 2 1 4
    2 3 1 6
    1 2 3 6
    1 1 0 2
    3 1 0 4

    I hope this helps please let me know if you have additional questions.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,530

    Re: Add and Replace columns on Different Sheet

    At the top yellow banner it explains how to attach a workbook.
    Preferably a before and after example with an explanation on how you arrived at the result.

  5. #5
    Registered User
    Join Date
    09-28-2021
    Location
    san Francisco, California
    MS-Off Ver
    2010
    Posts
    32

    Re: Add and Replace columns on Different Sheet

    It is pretty simple...I do it manually now...by looking at for all column A & B manually adding the columns and posting on Sheet 2....Some months have many more columns and rows could change as states get added. Hopefully this helps if you need further clarification, please let me know. Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,530

    Re: Add and Replace columns on Different Sheet

    This should get you going.
    Sheet2 should be empty. Clearing Sheet2 of all data can be made part of the code if you want.
    If you want it for all individual values (A, B, C, D) of Row 6 in Sheet1, you have to let us know.
    There is faster ways but data range dependent, this should be sufficient.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-28-2021
    Location
    san Francisco, California
    MS-Off Ver
    2010
    Posts
    32

    Re: Add and Replace columns on Different Sheet

    Thank you so much...everything worked great. I really appreciate your help!

  8. #8
    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
    81,063

    Re: Add and Replace columns on Different Sheet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    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.

  9. #9
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,530

    Re: Add and Replace columns on Different Sheet

    Thank you for letting us know that all is working as per request.
    Good Luck and stay safe.

+ 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. [SOLVED] copy specific columns and replace values & calculate values from sheet to another
    By abdo meghari in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2021, 04:30 AM
  2. [SOLVED] Find and Replace Multiple Columns in Sheet 1 Based on a Column Values in Sheet 2
    By adblog3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-07-2020, 01:49 PM
  3. Macro for find and replace columns from one sheet to another
    By dorabajji in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2019, 07:44 PM
  4. Find and replace but replace value of cell 3 columns along
    By batchjb69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2014, 10:57 AM
  5. Multiple Find/Replace on a specified sheet and outputtingin a separe sheet
    By scfn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2013, 07:27 AM
  6. Replies: 0
    Last Post: 02-22-2013, 09:23 AM
  7. Find and replace columns with others of another sheet
    By Costasg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2011, 11:32 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