dilemma on writing a VBA code v/s querying

buffalo

Board Regular
Joined
Jun 19, 2003
Messages
183
Hi,

Suppose I have the following Columns in a simple Excel workbook:

Date Price Symbol Account etc...

and say I want to find the total Prices at Date = 3/2/2004

I can write a VBA but would it be more sensible to use any databse functionality?... (I have realized that if this were an SQL table, then i could have used SELECT sum(Price) from Table where Date = '3/2/2004'; etc... type of type which would have been much faster, is there such a functionality in Excel?)

Thank you in advance for any suggestions
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi,

You can just use one of Excel's built in formulas - SUMIF e.g.
Book1
ABCD
1DatePrice
22/01/20043.76
32/01/20043.82
42/01/20044.10
52/01/20040.56
63/01/20043.11
73/01/20041.67
8
9
10QueryDate2/01/2004
11Sumofpricesforthisdate12.24
Sheet1
 
Upvote 0
Thanks Dan.

Is there a way, I can output my answers to a 'report'?

Basically, at the end of everyday, I have many calcultions to make and then input these values to a nice-looking report.

thanks
 
Upvote 0

Forum statistics

Threads
1,224,396
Messages
6,178,390
Members
452,844
Latest member
Shebl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top