Posts by Maqbool

    Re: Macro coding


    Hi


    Have a look at Pivot Table instead of Macro. I believe it is the best for something like above.


    Regards


    Maqbool

    Re: Removing (-) dash from a cell


    Hi
    If you are using my code change the code as follows;


    Code
    If i > 0 Then 
            Application.EnableEvents = False 
            Target.Offset(0, 2).Value = "" 
            msgbox("Cell C1 is blank" ,vbInformation,"Empty Info"  'change as you want
    Else


    Regards


    Maqbool

    Re: Removing (-) dash from a cell


    Hi nitesh_greatie


    You cant do that with a formula. Put the following code in change event of the worksheet.



    Regards



    Maqbool

    Re: Removing (-) dash from a cell


    Hi


    If I understand you correctly, the following formula in B1 will remove all the "-" from the value entered on cell A1.


    [F]
    =SUBSTITUTE(A1,"-","")
    [/F]


    Regards


    Maqbool

    Re: Macro to open files using keywords


    Hi Miheer:


    Sorry - I dont quite understand your query. I assume that, if that particular file is not found in the directory, you need to put "Error" in the next cell. If so, change your code as below.


    Regards



    Maqbool

    Re: Macro to open files using keywords


    Hi


    The following code will open the files. I have not applied any conditions or checks. Change the according to your needs.




    Regards



    Maqbool

    Re: VBA SumProduct - Issue with number format cells


    Hi


    Welcome to the forum


    Try the following:




    Regards



    Maqbool

    Re: Macro to open files using keywords


    Hi Miheer:


    Little bit confused...


    Do you want to open files one after another?? how many files you are trying to open at a time?


    Can you post a sample workbook of your input?



    Regards


    Maqbool

    Re: Dynamic Chart, Using Original Table of Data for Multiple Charts AFTER Sorting


    1. Create the a range name for source data. In the sample workbook I did it on sheet1.


    Quote

    Am I using the data from the query as the source data for my graphs


    Yes - the query will be the data source. The chart will change according to your criteria. So that only 2 charts can plot in the sheet at a time. One for Test Result 1 and one for Test Result 2. My assumption was you need to create the chart according to the criteria selection.


    If you need to create multiple charts at a time you need to create different queries. Each query you can limit the fields that are needed to plot the chart. So you can do it in one sheet. No need to display all the fields in the second sheet. And your original data will be intact and no need to sort each time.


    And thank you very much for the willingness to pay. But I dont expect any thing for helping here. Thank you very much.



    Best Regards


    Maqbool

    Re: Dynamic Chart, Using Original Table of Data for Multiple Charts AFTER Sorting


    Hi


    Since you need an XY scatter chart.. here is another solution for you. I have created this using Microsoft Query.
    To work this file - save this file in a folder called OZGrid on your C drive. You dont have to do any thing on this file.
    You can try the following on another dummy file. I have not created any charts since you know how to create it.


    1. Create a named range on your original file. Should not refer to table. (see named range - TblData)
    2. Select Data from the ribbon then "From Other Sources" from Get External Data tab.
    3. Click on Microsoft Query
    4. Select Excel Files and Clik OK (screen shot 2)
    5. Choose the same File as source file. Query wizard will prompt with the named range
    5. Follow the wizard unti the last step. Select View Data or edit query in Microsoft Query (screen shot 2). No need choose criteria option and sort option.
    6. Select the criteria as shown on the screen shot 3. (While entering these parameters it prompt.. Enter a value to it)
    7. Save the query in a folder and then from File menu select return to Excel.
    8. Select a new sheet and place the curson leaving two rows on the top
    9. Once the data placed on the sheet then right click and select "Refresh"
    10. On prompting for parameters refer to the cells where your criteria resides and select "Use this value/reference for future refresh and Refresh automatically when cell value changes
    11. Now when you change the cell values on row 2, the data will get updated and your charts also.



    Best Regards



    Maqbool

    Re: Dynamic Chart, Using Original Table of Data for Multiple Charts AFTER Sorting


    Hi



    Can you please clarify the following
    1. Do you need to plot only scattered charts? Or any other type will fine with you. We can not plot scattered charts with pivot table.
    2. When you use age as a variable - are you entering it like >= age and <= age? or do you want to plot the charts of all ages for disease type or Gene 1 Copy #, (in otherword, your x value will be always all the ages within the selected disease type or Gene1copy#?)

    Regards


    Maqbool

    Re: Macro to open files using keywords


    Hi


    It seems that you don't have a file with the fund name you mentioned on the B2.

    Quote


    "C:\Admin\USD_Cash__1013.xls" not found


    From the above line it seems, you left B2 blank. Fund name not mentioned in the B2.



    Regards


    Maqbool