+ Reply to Thread
Results 1 to 2 of 2

Simple Macro?

  1. #1

    Simple Macro?

    I can't seem to do a standard Print IF when the IF references a formula
    (Probably because I need something a little more complitcated?) Let's
    say (Sheet2)A1= (Sheet1)A1, (Sheet1)A1=Bob. I know I can just call a
    macro to Print Sheet 2 if (Sheet1)A1=Bob, but can I Print
    If(Sheet2)A1=Bob? I don't really know how to write it out if this
    doesn't make any sense, but when I reference a cell containing a
    formula, I cant reference the value of the formula (Wether It's Bob,
    Joe, Sue, etc...), that or I just don't know how......... (<----Most
    Likely...)

    Thanks for the help!


  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    Put this code in the Sheet2 section of the VBE. IF your formula is Sheet2!'A1 = Sheet1!'A1, Anytime you change the value of Sheet1!A1 to Bob or BOB or boB Sheet2 will print.


    Please Login or Register  to view this content.


    Quote Originally Posted by [email protected]
    I can't seem to do a standard Print IF when the IF references a formula
    (Probably because I need something a little more complitcated?) Let's
    say (Sheet2)A1= (Sheet1)A1, (Sheet1)A1=Bob. I know I can just call a
    macro to Print Sheet 2 if (Sheet1)A1=Bob, but can I Print
    If(Sheet2)A1=Bob? I don't really know how to write it out if this
    doesn't make any sense, but when I reference a cell containing a
    formula, I cant reference the value of the formula (Wether It's Bob,
    Joe, Sue, etc...), that or I just don't know how......... (<----Most
    Likely...)

    Thanks for the help!
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

+ 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