+ Reply to Thread
Results 1 to 16 of 16

cells and graphs appear after filling other cells

  1. #1
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    cells and graphs appear after filling other cells

    Hello again

    I am using Excel 2007 and I want that some cells and graphs only appear after the user fill some other cells.

    How can i do that?

    Tks for the help
    Last edited by Sonyk; 04-14-2009 at 07:37 AM.

  2. #2
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: cells and graphs appear after filling other cells

    you can use vlook up commnd

  3. #3
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: cells and graphs appear after filling other cells

    could you be more specific please? where is that comand? My excel is not in english

  4. #4
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: cells and graphs appear after filling other cells

    can you attach some sample file with your requirements so that i can write it over there as I'm still confuse .... do you want to link data in other sheet ????

  5. #5
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: cells and graphs appear after filling other cells

    \1

    see the jpeg

    For example i have a row

    1 2 3 4 5 6 7 8 9 TOTAL

    I want that ONLY AFTER filling the row, the TOTAL appears

    AND

    one sheet appears available to see BUT ONLY AFTER filling the cells
    Last edited by Sonyk; 04-02-2009 at 06:01 AM.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,576

    Re: cells and graphs appear after filling other cells

    First part you can do something like:

    in O14 put formula:

    =IF(COUNT(C14:N14)=10;SUM(C14:N14);"")
    And same for rows 15,16 etc...

    But for new sheet I don't know. Someone more skilled will help you..

  7. #7
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: cells and graphs appear after filling other cells

    sorry i can't see the file as its blocked by our company. ..............

  8. #8
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: cells and graphs appear after filling other cells

    Suppose you have data in A2:A11 Cells and when ever you'll skip some cells then it will hide sheet2 else will take you to sheet2 .... You can run macro by clicking button ..... I"ll automate you after getting green signal from your side ......


    =IF(COUNT(A2:A11)=10,SUM(A2:A10),"FILL")




    Sub Macro1()
    '

    If Range("A12").Value <> "FILL" Then


    MsgBox "Now you can see sheet2"


    Sheet2.Visible = xlSheetVisible

    Sheets("Sheet2").Select
    Range("B13").Select


    Else

    MsgBox "Now sheet2 will be hide "


    Sheet2.Visible = xlSheetHidden

    Sheets("Sheet1").Select
    Range("a12").Select


    End If



    End Sub
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: cells and graphs appear after filling other cells

    the first part is solved

    but the second part:

    i have to click the button (CHECK MACRO) for that thing work... I want it to be automatically

    sorry for the trouble

  10. #10
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: cells and graphs appear after filling other cells

    Here we are now ....... I've attached the auto sheet ...... you can remove messages boxes from the code as its only for your guideline and further work ........



    Private Sub Worksheet_Calculate()

    If Range("A12").Value <> "FILL" Then


    MsgBox "Now you can see sheet2"

    Sheet2.Visible = xlSheetVisible

    Sheets("Sheet2").Select
    'Range("B13").Select

    Else

    MsgBox "Now sheet2 will be hide "


    Sheet2.Visible = xlSheetHidden

    Sheets("Sheet1").Select
    Range("a12").Select


    End If


    End Sub
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: cells and graphs appear after filling other cells

    ok it works in that file but i want it to work on my file, so what i did was (remeber it is the first time i work with excel in my life):

    -Visual Basic

    -Insert Module

    -

    Sub Macro1()


    If Range("C8").Value <> "" Then - This says that if C8 is in blank then... right?


    MsgBox "works"


    analise.Visible = xlSheetVisible The sheet i want visible is called analise

    Sheets("analise").Select
    Range("B13").Select - What does this command?


    Else

    MsgBox "Now sheet2 will be hide "


    analise.Visible = xlSheetHidden

    Sheets("APRen").Select - APRen is the first sheet
    Range("C8").Select

    End If

    End Sub

    Then I saved and appeared one message box saying that the book dont have permission for Macros BUT IT DOES cause i clicked to allow it

    I clicked YES anyway but nothing happened, what am i doing wrong?

    In ultimate case, i will edit your sheet and try to see if it can works

    thanks very much

  12. #12
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: cells and graphs appear after filling other cells

    i edited your file and was alright, changed the code like i wanted it to be and everythng was smooth but i still dont know how to create more of that, to work with other sheets and cells...

    tell me pleae how do you created that macro and how in gods name i make excel quiet about macros and security (i clicked in security macros and still it says that is protected against macros)

  13. #13
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: cells and graphs appear after filling other cells

    First of all allow macro to run thru

    Excel Option > Trust Center > Trust Center Setting > Macro Settings > click Enable All Macros ....

    Now macros will run on your computer ...

    2nd Part ....

    Press Alt + F11, Visual basic editor will apear.
    on Left side you can see your sheets
    Now double click any sheet
    on Right side you will see two drop down 1. General 2. Declaration
    Click General and accept work sheet
    now click on declaration, you will see lot of options
    select Calculation and enter the code there. now what ever be the changes it will run ......

  14. #14
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: cells and graphs appear after filling other cells

    Quote Originally Posted by mubashir aziz View Post
    First of all allow macro to run thru

    Excel Option > Trust Center > Trust Center Setting > Macro Settings > click Enable All Macros ....

    Now macros will run on your computer ...

    2nd Part ....

    Press Alt + F11, Visual basic editor will apear.
    on Left side you can see your sheets
    Now double click any sheet
    on Right side you will see two drop down 1. General 2. Declaration
    Click General
    and accept work sheet
    now click on declaration, you will see lot of options
    select Calculation and enter the code there. now what ever be the changes it will run ......
    what is in red is solved, however, the thing about macros was that i have to save as a "file allowed by macros", although the security was off.

    2nd part

    i see the drop downs but when i change to General nothing happen. Where is the Calculation thing?

    And...

    i must place the macro in the code of the specific page right? like you did in your macro

  15. #15
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: cells and graphs appear after filling other cells

    hey man i figured out a easy way for me to do this!

    like this:


    If Range("m53").Value <> "" Then


    MsgBox "now you can see"

    Worksheets("sheet2").Visible = True

    Sheets("sheet2").Select

    Else

    MsgBox "now you dont"

    Worksheets("sheet2").Visible = False

    Sheets("sheet1").Select

    End If

    End Sub


    this works for now but i will run tests before i say it is solved

  16. #16
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: cells and graphs appear after filling other cells

    ok it works great that way i said

    thanks for the help

    SOLVED

+ 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