1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Macro excell 2k3 help with including "IF"

Discussion in 'Business Applications' started by Iggzik, Feb 11, 2013.

Thread Status:
Not open for further replies.
  1. Iggzik

    Iggzik Thread Starter

    Joined:
    Feb 10, 2013
    Messages:
    6
    Hello,
    this is what i recorded, it contains what it should do, missing only "choose / if" part for highlighted parts.
    Im noob in programming macros here so i need your help :eek:
    Thanks in advance for any help. Have fun

    Sub TESTCOPYPASTE()
    '
    '
    '

    '
    Range("B10").Select
    ActiveCell.FormulaR1C1 = "NYI" in this B10 cell will be value (ana/bos/buf....) and i need macro to lookup that value in worksheets and do the rest what already is here
    Range("B11").Select
    Sheets("NYI").Select
    Range("B7:L31").Select
    Selection.Copy
    Sheets("Calculator").Select
    Range("B58").Select
    ActiveSheet.Paste
    Sheets("NYI").Select
    Range("S7:AC31").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Calculator").Select
    Range("B29").Select
    ActiveSheet.Paste
    Range("K10").Select
    Application.CutCopyMode = False
    Selection.ClearContents
    ActiveCell.FormulaR1C1 = "CAR"
    Range("K11").Select
    Sheets("CAR").Select
    Range("B7:L31").Select
    Selection.Copy
    Sheets("Calculator").Select
    Range("B112").Select
    ActiveSheet.Paste
    Sheets("CAR").Select
    Range("S7:AC31").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Calculator").Select
    Range("B85").Select
    ActiveSheet.Paste
    End Sub
     
  2. Iggzik

    Iggzik Thread Starter

    Joined:
    Feb 10, 2013
    Messages:
    6
    ok, found it through google

    Sheets(Range("B10").Value).Select

    thx for your time anyway, have a nice day
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1089044

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice