Consulting

Results 1 to 15 of 15

Thread: array

  1. #1

    array

    hi
    there are three sheets one bank_notes second notes and last value
    i need an array function which can calcualte the notes aviavable on banks_notes
    which i enter in the value sheet the put then in notes sheet
    eg:
    1.if i enter 150 in value sheet value cell
    i should GET from the bank_notes sheet CELL avaiable_NOTES WITH THE HIGHEST facevaule
    i should get one 100 note and one 50 note in notes sheet
    2. if i enter 255 in value sheet value cell
    i should GET from the bank_notes sheet CELL avaiable_NOTES WITH THE HIGHEST facevaule
    i should get one 200 note and one 50 note and one 5 note in notes sheet
    3.so on

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    How's this?
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    hi
    thanxs a lot in one shot gr8

    one more issue in this
    if for eg:
    250 one 200 and one 50
    it should delete from bank_notes cell AVAILABLE_NOTES
    18 to 17 and one 50 AVAILABLE_NOTES 25 to 24
    because AVAILABLE_NOTES will decrease as the notes are given
    thanxs once agin

  4. #4
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    You can't do that with a formula so it would have to be VBA - is that acceptable?
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    yes

  6. #6
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    OK and how do you want it triggered? Via a button, or when you change the value in the cell on the value sheet? Also, do you want the used notes stored as a list on the notes sheet, or do you want to overwrite them each time?
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    no dont want to overwrite them each time?
    rest every thing
    thanxs rory for soo fast

  8. #8
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    How's this - I added a button to run the allocation.
    Regards,
    Rory

    Microsoft MVP - Excel

  9. #9
    hi

    its not working when i click allocate notes
    1.one more thing when i get the notes
    it should decares the value from avaiable _notes
    eg:if 150
    avaiable _notes 100 is 75 it should be 74 and 50 is 22 it should be 21
    2.if there is no avaiable _notes it should give message "no currency avaiable"
    balance is ....

  10. #10
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    Did you enable macros? It will allocate the notes, reduce the available count for each and show any unallocated balance in the final column.
    Regards,
    Rory

    Microsoft MVP - Excel

  11. #11
    hi
    ok i enabled
    i got different error
    when i dont have any notes i get error (debug)... in code..

  12. #12
    hi
    ok i enabled it works
    i got different error
    when i dont have any notes i get error (debug)... in code..

  13. #13
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    I admit I never considered that option! Try this one.
    Regards,
    Rory

    Microsoft MVP - Excel

  14. #14
    no attachment did not recieve attachement

  15. #15
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    It's in the post above.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •