I am builiding a spreadsheet that keeps track of my monthly business expenses. I use a small applet on my blackberry that allows me to enter each expense I incure on a daily basis. At the end of the month I can export this expense data from my blackberry applet to my computer as a csv file. So each one of my daily expense entries are seperated by a comma. Simple enought right?
Here is where it get's a bit interesting. Because I never know exactly how many expenses I am going to have in a given month, I don't know how many rows in my spreadsheet to create to handle each expense. Some months I may have 30 and some months I may have 100 individual expense transactions.
My spreadsheet has one row with the calculation formula needed for each expense. How do I copy that row with the formula and insert a new row right under the first row with the same formula for the exact number of records that I have in my csv file data that are individually seperated by commas.
I know this is a simple task for most of you guys but I am new to VBA.
I know that I am going to somehow have to define a dynamic range. I have been looking at the Querytable function and the add method. It seems to me that I need to import this data into my spreadsheet using some type of loop, looping for each record of data in the csv file. That way when I come to the end of my data in the csv file, I will then know when to stop inserting new rows for each new expense record.
I hope I have given enough information for your suggestions. Thank you all so much in advance for your help with this project of mine.
Can you post a sample of you Csv file? I guess it would make it easier to explain with it
if I know how are your table organised I maybe can suggest a little something, excel data can be extracted from mainly 3 ways, using cell, rows, and column location, your excel sheet is similar to a large X,Y coordinate graph, cells, rows and column are define with numbers, when you loop just increment the number used as reference