Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: VBA Code to Multiple Specific Cells by Cell Value
Thanks Thanks: 0 Likes Likes: 0

  1. #11
    New Member
    Join Date
    Aug 2019
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    Great, thank you for your help.

    One last thing: if I wanted to add two additional cells, C45 and D81, how would I do that?

    Quote Originally Posted by Fluff View Post
    How about
    Code:
    Sub IncreaseByPercentage()
      With Range("B14:D15")
        .Value = Evaluate("if({1},ceiling(A1*" & .Address & ",0.05))")
      End With
    End Sub

  2. #12
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    27,958
    Post Thanks / Like
    Mentioned
    467 Post(s)
    Tagged
    47 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    Why have you just duplicated post#9? Please do not duplicate your posts in future.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #13
    New Member
    Join Date
    Aug 2019
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    It was an accident. Won't happen again.

    Quote Originally Posted by Fluff View Post
    Why have you just duplicated post#9? Please do not duplicate your posts in future.

  4. #14
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    27,958
    Post Thanks / Like
    Mentioned
    467 Post(s)
    Tagged
    47 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    Thanks, did you see post#10?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  5. #15
    New Member
    Join Date
    Aug 2019
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    Yes, that is perfect. Thank you again.

    Quote Originally Posted by Fluff View Post
    Thanks, did you see post#10?

  6. #16
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    27,958
    Post Thanks / Like
    Mentioned
    467 Post(s)
    Tagged
    47 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    My pleasure
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  7. #17
    New Member
    Join Date
    Aug 2019
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    I ran into a situation where I need to decrease the cell values based on the value of A1. Is there a simple solution for that?

  8. #18
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    27,958
    Post Thanks / Like
    Mentioned
    467 Post(s)
    Tagged
    47 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    Change Ceiling to Floor
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  9. #19
    MrExcel MVP
    Moderator
    Peter_SSs's Avatar
    Join Date
    May 2005
    Location
    Macksville, Australia
    Posts
    40,966
    Post Thanks / Like
    Mentioned
    90 Post(s)
    Tagged
    21 Thread(s)

    Default Re: VBA Code to Multiple Specific Cells by Cell Value

    Quote Originally Posted by rbellavance22 View Post
    I ran into a situation where I need to decrease the cell values based on the value of A1. Is there a simple solution for that?
    Sample data & expected results?
    Hope this helps, good luck.
    Peter
    Excel 365 - Windows 10
    - Want to help your helpers by posting a small, copyable, screen shot directly in your post? Look here
    - If posting vba code, please use Code Tags - like this [code]Paste code here[/code] - or use the # key in the Reply window
    - Read: Forum Rules, Forum Use Guidelines, & FAQ

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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