Posts by rameshjeni

    I had made an Excel based FIFO app for use in my Stock market trades. While this template works OK sometimes it seems to ignore some "sell" trades and result is in error. Also sometimes it gives some blank areas in the "Results" sheet.


    How it works: you enter the trade transactions in "Transaction" tab as per structure given and run "FIFOData_v_10May15" macro. it will create buy and sell trades in the FIFO tab based on FIFO logic. You can then use it make yr P and L estimate. It handles both short and long (normal) sales.

    Problem is as follows

    -some areas are left blank and have to be manually filled.

    -Some transactions are ignored and left out of reconciliation. Not sure when this happens.

    -difficult to modify if my requirement changes

    -unitising the cost as the addon s like unit/total brokerage are shown wrong and I have to adjust manually in the extended area.


    The reliance file esp has some vanishing transactions issue.


    Can someone suggest how to improve or rectify? (Though I am not very conversant with VBA I have struggled thru help from experts in this forum and Google and got this working from as basic system given by an expert in this group (his name is Shark)).

    Pl let me know if you need any clarifications

    I tried a simple array sub routine to pass an array from a sheet (a1:a10) and receive this array into another sub routine. The idea is to do an elaborate array multiplication. It doesn't seem to work. Not sure where am I going wrong as this is a standard code taken from MSDN site



    any suggestions?

    I made a VBA code that first reads the worksheet names into a combo box. Then I can select a worksheet and perform a SORT operation based on 2 criteria.
    The variable YY is declared as public in the form module so that it can be accessed in the SortThisWB module/ . On running the code It gives subscript out of range error. Any ideas on what is the issue here


    I have a problem in passing a value selected to input box to a variable inside a formula as given below



    I am attaching a code where I get the details of folder and file names and based on that do a series of actions on two files. The code gets stuck in the step "Workbooks(MyFilename).Activate". Basically the file name "MyFilename" from Open_File function is not getting passed to the " OpenWorkbookFromFolder" sub.


    any suggestions on where the problem could be?

    I have attached the code where I am trying to select a user range thru a subroutine and use this generically to copy from one sheet and paste it to another sheet I am using pastespecial as I want to copy only the format and not the values. The code dos not work and gets stuck at highlighted line in the attachment.the message i get is Run time error 1004 . pasteSpecial method of range class failed Any suggestions to correct this error?





    The crux of the problem

    • First sub selects a range to be copied in Sjheet1 as specified by the user
    • Second subroutine activates a sheet “COGNI”: and tried to paste into a location specified by user thru input box
    • The macro is stuck at highlighted point