+ Reply to Thread
Results 1 to 3 of 3

print a report based on cell value

  1. #1
    Registered User
    Join Date
    05-25-2009
    Location
    Brussels
    MS-Off Ver
    Excel 2003
    Posts
    2

    print a report based on cell value

    Hello there people,

    I'm new on the forum and hope to learn some new excel tricks. When i was googling i found this post : http://www.excelforum.com/excel-prog...ell-value.html

    I'm looking for the same thing, this great macro by Leith Ross looks for the word "buy" in kolom A starting at A2. Now this all works fine until i change the value of the colum into a if statement : =IF(C2>0;"buy";"NR"). See the attachment on what i mean.

    If i run the macro now i get error 91 : objectvariable or blockvariable With is not set.

    I can work around it, if i hardcode the A2 with "buy" and then A3 etc with the if statement i works for some strange reason. But there must be a smarter way of doing it, that's why i came here .

    Hope you guys can help me . And i hope Leith Ross dont mind if use his code, it's super .

    Arjan
    Attached Files Attached Files
    Last edited by excelluni; 05-27-2009 at 07:58 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: print a report based on cell value

    We are experiencing some problems since the srver move, Leith cannot post in this thread so he has asked me to post this amended code
    Please Login or Register  to view this content.
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    05-25-2009
    Location
    Brussels
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: print a report based on cell value

    Hi there,

    ooh no problem

    but about the code, it's the same as in my test.xls. At least i couldnt find any difference. But thanks anyway.

    After some extensive testing en googling i finaly found what i was looking for. I got my code working like how i want it to. This was just the basics i needed it to look for cells > 0 and then generate a report on those files. I've just combined serveral codes and used some of my own vba knowledge and put them together in one macro .

    I'll change this to solved, because i solved it in another way.

    thanks

+ 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