+ Reply to Thread
Results 1 to 4 of 4

IF function in a macro?

  1. #1
    Registered User
    Join Date
    08-20-2010
    Location
    Bangkok, Thailand
    MS-Off Ver
    Excel 2003
    Posts
    6

    IF function in a macro?

    Dear all,

    I have an issue with a Macro. What I would like to do is:

    - select certain sheets according to a fixed criteria (e.g. sheets 1,2,3 if ARB is displayed in Sheet 1, Cell D8; sheets 1,5,7 if AWB is displayed in Sheet 1, Cell D8; etc.)
    - copy the selected sheets in another Excel file, which will automatically open
    - have the file save itself automatically on the user's Desktop with a specific name

    So far, I managed to do parts 2 & 3, but I am struggling with part 1. Here is the code i used:

    Please Login or Register  to view this content.
    Thank you all for your help. It is much appreciated!!!

    Best regards from Bangkok,

    Luccin
    Last edited by Luccin; 08-23-2010 at 12:14 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: IF function in a macro?

    Do you want to add them to the array?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Oxford
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    120

    Re: IF function in a macro?

    Hey,

    The IF statement will be something like this

    Please Login or Register  to view this content.
    Is this what your after?

  4. #4
    Registered User
    Join Date
    08-20-2010
    Location
    Bangkok, Thailand
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: IF function in a macro?

    Thanks for your help! I finally managed to get what I was looking for.

    Best regards,

    Luccin

+ 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