+ Reply to Thread
Results 1 to 4 of 4

copy B column to all sheets with any updates

  1. #1
    Registered User
    Join Date
    09-13-2019
    Location
    wales
    MS-Off Ver
    2016
    Posts
    4

    Question copy B column to all sheets with any updates

    hello all, newbie here, can you help please?
    I want the B column on sheet one to be copied to all sheets and any new ones that are added, also to update all sheets if someone adds to sheet one column B ,
    so work bookwill work like this, it has for example three sheets, on sheet one column B1[A],B2[B],B3[C], i would like this to be automaticly copied to all existing and if i add a new sheet it will also copy column B to it ,
    if a user adds items to column B on sheet one then it will automaticaly up date ALL sheets , how do i achieve this please?

  2. #2
    Registered User
    Join Date
    09-13-2019
    Location
    wales
    MS-Off Ver
    2016
    Posts
    4

    Re: copy B column to all sheets with any updates

    hello, I have found this code that does what I want,
    Dim ws As Worksheet
    Dim i As Double
    i = 0
    Dim bletter As Boolean

    For Each ws In ThisWorkbook.Worksheets

    If ws.Name <> "master totals" Then
    bletter = IsNumeric(ws.Range("B1").Value)
    If bletter = True Then
    i = i + ws.Range("B1")
    End If
    End If

    Next
    Sheets("master totals").Range("B1") = i
    which does the job, BUT can this also be modified to work on rows as well? so it goes to each sheet starts at B1 thenB2,B3 etc and loops can a loop be put on this so on each sheet will look at cell A1 if it has a value then it will add value of B1 to "master totals" sheet then go on to A2 until it comes to a cell in A column that is empty and stops , then goes on to the next sheet
    Attachment 641442
    so A40 has a value so loop will run but when it comes to A44 this is empty so it will stop running and go on to the next sheet .

    I hope this is clear?

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2016 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    30,900

    Re: copy B column to all sheets with any updates

    This has been moved to the VBA section. In future, if you want a thread moving, contact a moderator, as you cannot do this yourself.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  4. #4
    Registered User
    Join Date
    09-13-2019
    Location
    wales
    MS-Off Ver
    2016
    Posts
    4

    Re: copy B column to all sheets with any updates

    thank you for your help

+ 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