Posts by gn00588950

    Dear All,


    I'm currently learning Pivot Table to facing below issue.


    I've have a set of example raw data and the filtered pivot table as attached file.


    However, when I try to compare the amount Difference from previous month for each sales person, I found that value in Jan-2010 was empty.


    Would like to know if there any incorrect setting causing this issue?


    Regards
    Tony

    Re: Use INDEX/MATCH in VBA to fill labels



    Can try to use Excel.Evaluate?


    Code
    Private Sub cbCustID_Change()
    
    
    lblWONum1.Caption = Excel.Evaluate("=INDEX(A2:N9,MATCH(" & cbCustID.Value & ",A2:A9,0),2)")
    lblWODate1.Caption = Excel.Evaluate("=INDEX(A2:N9,MATCH(" & cbCustID.Value & ",A2:A9,0),4)")
    lblInvoiceTotal1.Caption = Excel.Evaluate("=INDEX(A2:N9,MATCH(" & cbCustID.Value & ",A2:A9,0),6)")
    
    
    End Sub

    Re: vba to automatically resize user form depending on screen resolution


    Quote from schimmey;764316

    Hi Grimes0332,
    Thanks. I would like it to fit comfortably within the screen size rather than application as I intend to reduce excel when the user form is initialised. I tried the code above but it creates s small box in the middle of the screen. I can see where you are coming from through.
    Paul


    To minimized Excel & Showing userform, use below:

    Code
    Private Sub CommandButton1_Click()
    
    
    Application.WindowState = xlMinimized
    UserForm1.Show vbModeless
    
    
    End Sub


    Here is an example of getting Screen resolution (Win32-API)
    http://www.exceltip.com/genera…a-in-microsoft-excel.html


    And here, as screen resolution is not actual visual size, we may need to calculate the DPI as well:
    http://www.informit.com/articles/article.aspx?p=366892&seqNum=2

    Thus, to resize according to Screen Size, it may need to get Screen resolution * DPI * 85%:

    Hi,


    Just want to confirm whether it is impossible to paste with skipping hidden rows without VBA?


    For example, we having below in Sheet1


    [TABLE="class: grid, width: 50"]

    [tr]


    [TD="align: center"][/TD]
    [TD="align: center"]A
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]1
    [/TD]
    [TD="align: center"]Text1
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]2
    [/TD]
    [TD="align: center"]Text2
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]3
    [/TD]
    [TD="align: center"]Text3
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]4
    [/TD]
    [TD="align: center"]Text4
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]5
    [/TD]
    [TD="align: center"]Text5
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]6
    [/TD]
    [TD="align: center"]Text6
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]7
    [/TD]
    [TD="align: center"]Text7
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]8
    [/TD]
    [TD="align: center"]Text8
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]9
    [/TD]
    [TD="align: center"]Text9
    [/TD]

    [/tr]


    [/TABLE]


    And here on Sheet2, assume we've hidden Row 2 / 4, if it possible to paste like:
    [TABLE="class: grid, width: 50"]

    [tr]


    [TD="align: center"][/TD]
    [TD="align: center"]A
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]1
    [/TD]
    [TD="align: center"]Text1
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]3
    [/TD]
    [TD="align: center"]Text2
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]5
    [/TD]
    [TD="align: center"]Text3
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]6
    [/TD]
    [TD="align: center"]Text4
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]7
    [/TD]
    [TD="align: center"]Text5
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]8
    [/TD]
    [TD="align: center"]Text6
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]9
    [/TD]
    [TD="align: center"]Text7
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]10
    [/TD]
    [TD="align: center"]Text8
    [/TD]

    [/tr]


    [tr]


    [TD="align: center"]11
    [/TD]
    [TD="align: center"]Text9
    [/TD]

    [/tr]


    [/TABLE]

    Re: fill cell values based on cell value


    Quote from ghstwlker;763407

    I am trying to get a row of values based on a numerical cell value each time the value is changed.


    Basically if someone enters the value "3" in cell B15 I need the have the values of cells B16 to update to "Item 1", C16 to update to "Item 2" and D16 to update to "Item 3" once the user moves from cell B15 to another cell. If the user enters "5" in B15 then i will need B16 though F16 to populate accordingly and so forth.


    How many value need to be lookup? Could you attach an example workbook?


    Consider to use IF formula?

    Re: Please review my code



    Maybe your Row 1 was hidden before. Try to Unhide entire Sheet before workbook open


    For the Dot issue, it is better to be preceded, as per my understanding, the difference should be:


    - Rows("2:2").Select = Means 'Select Entire Row 2 On Current Active Window'
    - .Rows("2:2").Select = Because your code is having 'Sheet3.Activate' & 'With ActiveSheet' at the beginning, this means 'Select Entire Row 2 On Sheet3'


    But eventually, they should be same as your ActiveSheet is always on Sheet3

    Re: Possible To Change The Display Of #N/A By Cell Format?


    Quote from pike;750058

    got it ... just placed a zero in the total cell


    Hi Pike,


    Yes right. If we replace #N/A with 0, the chart will reflect 0%...


    Those, would like to see if it is possible to change the cell display #N/A with '-'.


    Seems like custom format is not possible to handle this...right :P...?

    Re: Possible To Change The Display Of #N/A By Cell Format?


    Hi Kjbox & Pike,


    Would like to know if I use "-" or custom format General;-General;"-"


    Can I hide those 0 value in chart?


    As far as know is that only #N/A value will be auto hidden in chart...


    Below are the example:
    This is the example if I used '0' in data with custom format: (0% will be displayed)
    [ATTACH=CONFIG]65855[/ATTACH]
    This is the example if I used '#N/A' in data: (0% will be suppressed)
    [ATTACH=CONFIG]65856[/ATTACH]

    Re: Dynamic name range not ignoring cells with NA()



    Hi BeepBoy,


    You should use COUNTIF to count cells that are not #N/A


    Like: =OFFSET(Sheet1!$H$14,0,0,COUNTIF(Sheet1!$H$13:$H$63,"<>#N/A")-2)

    Re: transfer data from one workbook to another wokbook


    Re: transfer data from one workbook to another wokbook


    Quote from prince bhatia;748628

    yes sir data is been copied well but it is not removing "R" the prefix ...no putting "yes" or "no" neither removing the space from ready to move....like you did in the previous work,, when the data is been pasted in i want it would have removed the r put yes or no ..remove space..but this time i dont want to select it from "A1", like previous coding but i want to select it from anycell i want and coding should work, like removing "r", removing space and putting yes or no! But you can refer the sheet i had attached in this thread!


    Everything has changed if you don't want to select start from A1. Here is the update


    Re: transfer data from one workbook to another wokbook


    Hi Prince,


    Are you using old code?...


    I've just checked your new attachment containing old code..


    The new one should be this