Displaying Values Used In Criteria Selection (Date Ranges) As Part Of Query Output
Dec 20, 2011
Using MS Query in Excel, I've created a simple query that pulls its records from an SQL dbase. Here's the statement:
SELECT uvVisit.FacilityListName, uvVisit.DoctorListName, uvVisit.Date, uvVisit.PatientVisitId, uvVisit.PatientLast, uvVisit.PatientFirst
FROM CPS.dbo.uvVisit uvVisit
WHERE (uvVisit.Date Between ? And ?)
ORDER BY uvVisit.FacilityListName
The query runs fine and prompts the user to enter beginning & ending date ranges for the visit date when executed. So far...so good...but, this requires me to manually insert a line in Excel above the 1st record and type in something like: "For Date Range: MM/DD/YYY - MM/DD/YY" to denote the date range that the qualified records fall into (something the user wants to see).
However, I'd like to find a way automatically preface and display in the report's output (perhaps as the 1st line of the report in Excel??) something similar to what I'm already typing, and have it pull the beginning and ending MM/DD/YY values from those supplied by the user in the parameter.
View 3 Replies
ADVERTISEMENT
Oct 11, 2008
I need to create formulas that reference a single date and output date ranges. The objective is to have a person input a Monday date in any given month and receive a four weeks out worth of dates and ranges. For example: In a lone cell, the person inputs 10/13/08. Automatically, the sheet produces the next full week range: October 19 – October 25 in a single cell and also produces a cell for each date. Example: Sunday 19, Monday 20, Tuesday 21, etc…. It should look like:
Monday Date:
10/13/08
October 19 – October 25
Sunday 19
Monday 20
Tuesday 21
Wednesday 22
Thursday 23
Friday 24
Saturday 25
and then repeat for three more weeks. I thought I had it figured out until the month changed. The dates continued in October instead of adding a month. This report will be ran weekly, so simply adding a +1MONTH to some cells will not benefit me as I’ll have to change the formula every week. I want the formula to compute the data without any manipulation over the next several years. The only change will be the Monday date.
View 2 Replies
View Related
May 8, 2009
I was wondering how to make the following: get a list where each Number from the "source file.xls" is assigned to a Group like in "final list.xls" through "conversion table.xls".
In the "source file.xls" we have apart from Number, the Series and Category columns. I need to compare both Series and Category to the same from "conversion table.xls" and in the third workbook output the matching Number from "source file.xls" and Group from "conversion table.xls" according to matching algorithm.
I am attaching the files:
source file.xls
conversion table.xls
final list.xls
All three should be different workbooks and the first two will need to be closed. Also very important is the source file can have many names so it would be great to implement an open dialog box to load the data from "source file.xls". All data is in text format....
View 10 Replies
View Related
Jun 3, 2013
If a user selects certain options from a drop down list created by cell verification (from list), is it possible to display an input box and have the resulting input populate on another worksheet in the workbook? I have an attendance template I'm working with and if a user selects OT (Over Time) then a input box is displayed prompting for how many hours. The overtime is then tracked on another worksheet.
View 1 Replies
View Related
Jan 23, 2014
I have a database with a list of transactions with multiple fields, including:
Customer ID
Store ID
Item ID
Date
Price
I am wanting to add a calculated field that displays the first (or MIN) Date from the date column, looking at all of the orders where the customer ID, store ID, item ID and price are the same.
In the attached file I have shown what I currently have, as well as a solution using a helper column, and formulas I would use if I wasn't using powerpivot.
View 2 Replies
View Related
Sep 20, 2013
I am currently trying to make a digital time card for my place of employment. I has an odd set up and odd date ranges. The pay period starts on the 21st of each month and ends on the 20th of the next month.
The time cards have 5 columns for each week starting on Mondays going to Sunday (also weird its not Saturday to Sunday) What I was hoping to accomplish was being able to select the starting month of your choice for pay period and have multiple cells update the week date range.
Date
Date
Date
Date
Date
**Here would be the drop down month select.
Sept 21 - Sept 22
Sept 23 - Sept 29
Sept 30 - Oct 6
Oct 7 - Oct 13
Oct 14 -Oct 20
View 2 Replies
View Related
Jun 21, 2007
Is there a way to put a floating date range in the criteria much the same as can be done in excel ie greater than Today() but less than Today()+3? I don't want to keep going in and adjusting the query if I don't have to and if I don't keep the range tight there is too much data.
View 9 Replies
View Related
Nov 19, 2009
Basically, each date, in the format mmm yy, has a cost, two cells right of the date. I want to create year sub totals at the bottom of the cost column by looking up the year element of the date....so in my own wierd logic, I want to ask, if in the range of cells C5 to C22, contains the year 10, add the cost in column E to the total cell (E27).....this is probably laughably simple to you guys, but when you dont know the correct term for the action, it is a swine to find.
View 5 Replies
View Related
Jul 7, 2014
So i'm receiving a web query on a sheet that is taken from a table off the web. When this data gets extracted into the sheet, it populates as "$xxxM" in order to show that it is a certain million dollars. The problem is, I need to total all these numbers to display at the bottom of my report. So essentially, I am trying to configure web query to display as "number" as opposed to "$numberM" so it is easier to total.
View 1 Replies
View Related
Nov 17, 2005
I need a formula that sums the values with 2 different criteria and 2 different look up ranges
View 9 Replies
View Related
Mar 11, 2008
I have a spreadsheet where my dropdown menu is taken from a master list. The master list is also broken down into several catagory specific lists.
I need a macro that will take the individual cells in the worksheet that use the master drop down list, check them against the contents of the specific lists (defined names) and assign a cell color fill based on wich list the data was found in.
lets say my master list is:
MASTERLIST
apple
orange
bananna
lemon
pork chop
sirloin
chicken wings
carrot
potato
onion
sage
thyme.............
View 9 Replies
View Related
Oct 23, 2009
My setup is - excel 2003 sp3 / windows xp
On one sheet (Data) I have a list of action items, each with owner; target date; classification and in some cases revised target date. I'm trying to report on these fields and provide a status, by owner and classification, of how many are overdue; due this month; due next month; due beyond 2mths.
Using a SUM array formula on another sheet I can count the number that are overdue based on date; owner; classification; and target date, but can't find a solution if there is a revised target date. Any guidance you can give would be greatly received.
=SUM((Data!$L$3:$L$27=D$18)*(Data!$P$3:$P$27=$C23)*(Data!$N$3:$N$27
View 9 Replies
View Related
Jun 12, 2014
I have two lists of values in separate columns with condition in adjacent cells, all on the same sheet
List 1 consists of numbers from 1 to 12, column to the right is either blank or Free
List 2 consists of numbers from 13 to 24, column to the right is either blank of Free
List 1 starts in A2, B2 is either blank or Free
List 2 starts in D2, E2 is either blank or Free
In column G, from G2 i want it to list all values from List 1 and List 2 where their status is Free
View 14 Replies
View Related
Mar 7, 2013
I have two vertical ranges that I need summarized into 2 adjacent vertical ranges.
"
A B C D
| SUMMARY
model qty| modelqty
1 4.12922.0000| 4.12952.2000
2 2.000012.1250| 2.000025.1250
3 4.12929.0000| 318.0000
4 318.0000|
5 4.1291.2000|
6 213.0000|
"
A1:A6 is my SKU's model number B1:B6 is my inventory C1:C6 should contain formulas that result in a summary of the models D1:D6 should contain formulas that result in a sum of the inventory count for each model
View 1 Replies
View Related
Jul 21, 2006
I have been trying to create a "Search" or "Look Up" form for my database. ( Attached file - "Test - Form").
I have been given a lot of help/ideas from this forum with which I managed to get to the stage where I could select the criteria i wanted to search by using a combobox and textbox in the userform. On hitting the "Find" button it shows all the results in the listbox.
The trouble started when I tried to display the listbox selection on the labels at the bottom of the userform. As the listbox is small and cant show all the fields properly, I need to display them in labels once user selects a particular record from listbox.
I managed to find some examples of this from this forum. (file attached "Action Log"). As I am not an Excel/ VBA expert, I have missed something and am not able to make it work.
View 9 Replies
View Related
Feb 26, 2008
I need to sum a value that falls between 2 date ranges. I have read a few posts on this subject and thought I had it working, but I realized I was getting values in fields I should not be.
=SUMPRODUCT((Details!H2:H100>=$E$4)*(Details!H2:H100
View 9 Replies
View Related
May 3, 2006
I need to count cells withdates in theme in a column. So that would be a CountA function; but only if the values in the cells are within a certain date range, a COUNTIF function. Here's what I thought:
=COUNTIF('All Employees'!O1351:O1364,">12/31/05,<2/1/06")
It returns a zero, which I know is not correct, as I checked it on a smaller sample....
View 13 Replies
View Related
Nov 6, 2008
summing monthly values based on different date ranges. For example if I have multiple contracts with different start and end dates and based on those date ranges, I want to sum the respective monthly production totals, how would I do that in a formula. I started to set up the table to include "start date month" and "# of months in contract". Is there a way to sum based on the start month and # of months in contract.
For example if hte contract started in Jan08 and ends in May08, the calculation would start with month "1" and sum over 4 months.
Here is an example: ....
View 9 Replies
View Related
Oct 19, 2012
I have 2 datasets that have a common y axis and was wondering if it is possible to graph them?
i.e. x axis A - hourly wage costs
x axis B - hourly sales
y axis - hours of the day
View 1 Replies
View Related
Mar 29, 2007
Need the query parameters which takes the date from the cell into the query. How should I modify my query if it needs to take the date from a cell?? The bold one date should be picked from one of the cell in sheet 2.
My query is this
WEB
1
http://fc-web-phl1-101.phl1:8090/gp/...runReport.y=12
Selection=15
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False
View 2 Replies
View Related
Jul 18, 2013
for example i have two work books where i need to compare the times, such as i need to see where does 10:26 am lies and after comparing it on workbook2 we need to return the data in a,b,c blocks infornt of 10:26am, i have tried IF(AND()) but i was not able to rationalise it for huge and random data.
Workbook1:
7/13/2013 10:26
7/13/2013 10:58
7/13/2013 12:06
7/13/2013 12:17
7/13/2013 12:29
7/13/2013 12:29
7/13/2013 12:37
7/13/2013 13:21
7/13/2013 14:24
Workbook2:
9:58:27abcassigned
11:45:09abcreleased
11:49:00ghiassigned
15:14:40ghireleased
15:25:57mnoassigned
Outout should be:
7/13/2013 10:26 a bc
7/13/2013 10:58 a bc
7/13/2013 12:06g hi
7/13/2013 12:17g hi
7/13/2013 12:29g hi
7/13/2013 12:29g h i
7/13/2013 12:37ghi
7/13/2013 13:21ghi
7/13/2013 14:24ghi
View 2 Replies
View Related
May 10, 2006
I want to pass an array to a function, and am unclear how to do it. For example, the following declaration does not work:
Public Function xyz(a() as Variant) as Double
There is an additional requirement that I would like the output also to be a range of the same dimensions, typically one column and 100 rows. Is this possible?
A further twist is that the function I am writing calculates two values for every element in the input array and I need the output of them both.
An inelegant solution would be to write two separate functions, but I was wondering if it is possible to get two array outputs from a single function.
View 7 Replies
View Related
May 21, 2014
I need a 'simple' vba that outputs all the dates in a range that correspond to a particular ID in a column as well as that same ID in a column beside the dates.
So basically using the data in columns A to B as input, to get columns E and F as output.
Also, for a lot more than just 3 IDs.
View 3 Replies
View Related
Mar 2, 2009
i have an idea that i will be able to select a team in sheet1 cell a1 via a dropdownlist and also c1 giving a home and away team
all teams have there own unique number which i would be able to list them all
it would then look at c1 compare it against the list and use that number
then on sheet two
it would return the results
web address is [url]
arsenals number is 142
aston villa are 154
View 14 Replies
View Related
Feb 27, 2009
I'm writing a couple of macros which require selection of a range. The user could either select the range before executing the macro or if range has not been pre-selected, an inputbox should pop-up through which the user can select required range.
View 9 Replies
View Related
May 24, 2007
If the selection (or any part of the selection) = bla bla bla
View 9 Replies
View Related
Feb 18, 2014
I have the following data:
Column A = Date
Column B = Reservations made per day
For ex:
A B
1 3/1/2011 5
2 4/5/2011 10
3 3/8/2011 15
Then I have a look up table where based on the date ranges it assigns a week number.
WeekDATE Range 1Date Range 2
718-Feb-1124-Feb-11
825-Feb-1103-Mar-11
904-Mar-1110-Mar-11
1011-Mar-1117-Mar-11
1118-Mar-1124-Mar-11
1225-Mar-1131-Mar-11
1301-Apr-1107-Apr-11
1408-Apr-1114-Apr-11
1515-Apr-1121-Apr-11
1622-Apr-1128-Apr-11
I am looking for a fomula that would assign a week to the corresponding dates on column A and tha would then add all of the reservations booked for each week.
View 11 Replies
View Related
May 27, 2014
Writing up some code, and I have a workbook with many named ranges. Question is simple...
Are named ranges a part of a collection object that I can use?
Looking to do something like:
[Code] .....
How to determine collection objects on my own in the future!
View 2 Replies
View Related
Jul 28, 2008
I m trying to make a query based on a dynamic range and paste the results in a sheettab of my wrorkbook.
View 9 Replies
View Related
Mar 22, 2012
What I need to do is that I have electrical tools that get tested on a certain date in Column A. I need Column B to look at column A and determine and display in date format the next quarter when test is due.
Practical example: Extension cord got tested on 04/04/12. The next test needs to be conducted on 01/06/12. If the test is overdue and gets conducted on 02/06/12. The column A will change to 02/06/12 and column B should change to 01/09/12 as a result.
The formula I have got to work is
=DATE(YEAR(F2)+IF(MONTH(F2)>9,1,0),CHOOSE(MONTH(F2),4,4,4,7,7,7,10,10,10,1,1,1,),1)
but this makes the quarter dates as APRIL, JULY AND OCTOBER - they need to be MARCH, JUNE, SEPTEMBER
when I change the formula to
=DATE(YEAR(F2)+IF(MONTH(F2)>9,1,0),CHOOSE(MONTH(F2),3,3,3,6,6,6,9,9,9,1,1,1,),1)
The dates work BUT if the following test is undertaken on 01/03/12 the date in Column B does not change to 01/06/12. Why? How do I get it to work?
View 6 Replies
View Related