Hi all,
I have to add all the values from a Sheet that acts as a Database to a Dictionary, and I am trying to spit out these Values where appropriate in another Worksheet. For illustrative purposes I created a sample Workbook with, Sheet("Database_ST") and Sheet("Output"), but in reality they are actually two entirely different Workbooks on different network drives, but I combined them into one to make it easier for the Example.
1. In Sheet "database_ST" each Stock has it's own unique Identifier in Row 1, and at each Date the data changes. The Column Numbers and row numbers will change (more data , with more Stocks might be added)
example_1.PNG
2. In another Sheet "Output" (in reality it is another workbook, ill adjust code later) im trying to fill in the sheet with the values from the Database. The Columns are in no particular order, nor are the dates but the data will always start as of Row7. Also column spaces splitting the data can apear at various points.
example_2.PNG
3. For the Dates which the Database Sheet does not have a value for, or a Stock that is not listed in the Database Sheet, I would like the Code to input a formula for example sake =RANDBETWEEN(0,10) (it is a custom function formula ill add later)
I am aware you can do this with a an If statement + Index Match formulas and not through code, however in reality their is VBA codes that run before this and after, creating new tables, clearing the data, and it is better to have it in VBA than manually putitng formulas each time
I am trying to use the Dictionary method because once everything is added to the Output sheet (values from database or if no values, the formula's value) I will then add all the new items to the dictionary and update the Database sheet. First I am trying to figure out the Output, if anyone has any ideas I would really appreciate your help.
EDIT: I forgot to add attachment it is there now
Bookmarks