+ Reply to Thread
Results 1 to 5 of 5

VBA code needed deserately for similar cells but do not know how to copy code!

  1. #1
    Registered User
    Join Date
    06-22-2013
    Location
    Aberdeen
    MS-Off Ver
    Excel 2010
    Posts
    14

    VBA code needed deserately for similar cells but do not know how to copy code!

    Hi. I am trying my best to finish this stock sheet but I do not know how to use the same code for different cells

    I need the same code that is used in cell B3 to be active in cells B4 & B5 but I need the alert at 6 on B4 and 10 in B5

    If anyone can do this for me or guide me it would be amazing

    cheers
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: VBA code needed deserately for similar cells but do not know how to copy code!

    Hi, Gunner_gav,

    amend your procedure in ThisWorkbook like
    Please Login or Register  to view this content.
    although with only one sheet in the sample you might as well use Private Sub Worksheet_Change(ByVal Target As Range) behind Sheet1.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    06-22-2013
    Location
    Aberdeen
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: VBA code needed deserately for similar cells but do not know how to copy code!

    Hi Holger

    Sorry but I am not that great with excel at all, how do I get that code in the spreadsheet all I know is that I need to press alt & F11 to get to the code page, not sure what to do then. Sorry again

    thanks
    Gav

  4. #4
    Registered User
    Join Date
    06-22-2013
    Location
    Aberdeen
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: VBA code needed deserately for similar cells but do not know how to copy code!

    I managed to get the previous code window open by going to view and then selecting code, I then deleted the code that was in and replaced it by pasting the code you ahve sent me in but nothing happens when the lower figures are entered into the cells

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: VBA code needed deserately for similar cells but do not know how to copy code!

    Hi, Gav,

    code is located in ThisWorkbook and works fine for me.

    Ciao,
    Holger
    Attached Files Attached Files

+ 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. VBA Copy Code is copying more than the cells needed
    By dgilbrea in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-19-2010, 11:59 AM
  2. [SOLVED] Copy Code Needed
    By JMB in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  3. [SOLVED] Copy Code Needed
    By MWH in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  4. Copy Code Needed
    By MWH in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  5. Copy Code Needed
    By MWH in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-22-2005, 02:05 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