Posts by ansridhar

    I am not an expert in using userforms. I have 100 textboxes in a form. In the Sub UserForm_Initialize, it promptly accepts user inputs and also stores the data in the respective cells in worksheet. It reaches end sub and then throws the error. I have one more sub for close button i.e. Sub CloseButton_Click(), which has only "Unload me". When I debug I get the error on the last line i.e. End Sub. What could be the reason for error?

    Re: Extract chronological data

    I got it. Thanks a lot. Will henceforth structure data in such a way that final reports are easily achieved by few commands rather than such a long code. Sincerely appreciating your effort to help me Roy, Logit.

    Re: Extract chronological data

    Do you mean that the records of both buy and sell are stacked one below the other? The problem is the past data is already built up over past many months. Henceforth I can ensure that 'new data' are placed one below the other for easy use in future. Is there a solution for the current data which is available only in this format?

    The sample file with requirements is enclosed. I have two sets of data i.e. BUY and SELL. Want to list data combining them in a chronological order. Tried using Index and Match combinations. Without luck. Had to manually cut and paste buy and sell data one below the other and then do it. Is there a way around directly?


    Re: Formula to replace contents of a cell

    Thanks for giving a solution. One doubt. There are several stocks. Some stocks are quoting at very low prices today.
    Take this example to understand.
    One stock X is priced 23 today. And high price was 67. So B1 is 67 as of now. It would be at least a year for A1 to cross 67. As long is A1 is below 67, B1 should not change. I presume with your suggestion of MAX command this would happen. I hope I am clear to you. Can you suggest a variation to your command or some other formula?

    As you have said correctly my first choice is by way of formula. If not, how I can transfer my query to VB page?

    Re: Formula to replace contents of a cell

    Let me clarify. Value in cell A1 is the price of a stock. Value in cell B1 is all time high share price of the same stock. This cell A1 gets updated at 7 PM everyday. Now if cell A1 increases when we update the data at 7 pm, I want cell B1 should show that new price. But if it decreases or remains the same, then B1 does not change. In other words cell B1 always shows highest price of the stock. Hope I have explained enough. Secondly, if I do manually everyday, I can replace by comparing A1 and B1. But my question is can we do it automatically, by writing a formula in cell B1 or elsewhere?

    [FONT=&quot]I have a value in a cell, say 273.75 in A1. Everyday, I download a data into this cell.[/FONT]
    [FONT=&quot]I have another cell with value 275.00 in B1.[/FONT]
    [FONT=&quot]Now, whenever in future, the downloaded value in A1 exceeds 275 say 278, I want B1 to change to 278 automatically. Can we do this by writing a formula in the relevant cell?[/FONT]

    Re: Search column with multiple conditions

    It is working. But the data is distorted; it appears the search is not filtering Feb 14 data. Please see enclosed file where data of previous year is also there. Therefore it is picking the largest serial number of previous year. Instead of getting "IC/012/Feb14", we get "IC/023/Feb13".
    See cell C 1481, where I entered the formula sent by you.

    Thanks for quick response.


    • Test mmmyy.xlsx

      (40.05 kB, downloaded 71 times, last: )

    I want to display the cell content after it has verified two things:
    1. It pertains to the running month
    2. It has maximum serial number
    The file enclosed is self explanatory.
    The formula would be dragged as every day data is likely to be added.
    I have written a formula, but I get error. Kindly look into it and advise.

    Thanks in advance.


    I have a list of around 2000 companies where many names are almost similar. An user would enter a part of name of the company in one cell. Search should be made in the list and should offer closest choice on the screen. Then he would simply select that, which will be further processed. The enclosed file gives my required with sample data list.


    • sear.xlsx

      (9.31 kB, downloaded 73 times, last: )

    Re: Convert Hours to Decimal for calculating wage

    What is CDbl? Can u clarify please? I dont use visual basic. Neither I have excel 10.

    Quote from Miceal;697583

    if your activecell contains the 301:55 then this will work:

    1. x = (int(CDbl(activecell))*24)+((activecell-int(activecell)*1440/60))