Populating Specific Cells With SQL Server Data?
Dec 11, 2012
A user has an excel document and there are 5 specific cells they need to populate. The data is in one of our SQL databases. Is it possible to create a new copy of that excel doc with those fields populated for each record? There are around 2000 records they don't want to manually populate each one.
View 1 Replies
ADVERTISEMENT
Jul 29, 2009
I need to run multiple queries and insert their results into Excel cells. Each query will return only one result (a number, or a null). What is the best way to accomplish this?
Below is an example of the code I'm currently using. It does return data to the cell specified, but I'm guessing there's an easier way to populate multiple cells with the results of multiple queries.
View 14 Replies
View Related
Dec 13, 2011
Is there a way to auto-populate all of the empty cells with the word "Need to Review" in a cell range (A1:A250)? Once any of the cells in this range is populated, whatever is inputted should house the cell.
View 9 Replies
View Related
Jan 7, 2014
I have a unique task i am trying to achieve (when i say unique i mean i am out of my depth). I am trying to take specific data from a couple of different sheets to populate other sheets whether it be copying the text of fill cell (color)
Excel Automation Test.pdf
I have Attached a PDF detailing.
View 2 Replies
View Related
Feb 14, 2013
I have a complex report with thousands of lines I am trying to clean up. In order to do this, I need VBA that recognizes specific text data starting after row 9. When it sees this, it will need to select and delete the 2 rows above it, the row it is in, and the 6 rows below it. 9 rows in total, some of which are blank. The text will repeat every 47-50 rows, but I cannot say exactly when it will repeat again. When it is repeated, I need the 9 rows deleted. At this time, there is only 1 column in the report because I need to split out the data in the cell into adjoining cells. Since I have not solved that yet, I need to just delete the entire row.
The text is written with spaces between each letter and a double space between words. It reads, "B I L L I N G M A S T E R I N V O I C E S E T U P L I S T I N G"
View 8 Replies
View Related
May 22, 2009
I have a macro which saves file to a specific folder. Problem is I can save the file only in my local drive C: but not on a server for some reason.
Here is the
At home in my home computer this code worked when C: was selected.
ChDir ("c:")
Title = Application.GetSaveAsFilename(Name, "Excel files (*.xls), *.xls")
ActiveWorkbook.SaveAs Name
Save the file in specific place
But when I substituted C: path with my server path it doesnt work! Have a look. Its the exact same code except my path is different.
ChDir ("\Lnf001Lnf1vol1SharedOP_ENGWork Order")
Title = Application.GetSaveAsFilename(Name, "Excel files (*.xls), *.xls")
ActiveWorkbook.SaveAs Name
View 9 Replies
View Related
Nov 25, 2008
This code should retrieve data from sql server to excel sheet
filtering according to the "where" statement
its a modified recorded macro.
View 7 Replies
View Related
Dec 6, 2011
I've come across an excel spreadsheet that has a pivot table which displays data from a sql server connection query. This worked fine before but recently the database it connects to was moved.
The connection string was updated to reflect this.
The main difference in the connection apart from a new server name, is that where before we were using a Trusted Connection, now we're using a SQL login.
Now only some of the data is shown.
The query still works - if I go into Edit Query (Data>Connections>Properties) the query runs fine. It just doesn't display properly anymore
I think this is something to do with the pivot table rather than any connection properties.
View 2 Replies
View Related
Jul 4, 2007
I worked with an Ozgrid macro until it was what I wanted using files on my local PC. I then edited the macro to get data from a closed workbook on a remote server. I now have a Run-time error '1004'
Method ' Range' of object'_Worksheet' failed and the debugger takes me to this line of code.
With Sheet1.Range(AreaAddress)
The only thing I have changed up to this point in the macro, is the address of the file on the remote server.
I am at a loss with this now. Am I trying to do the impossible? ....
View 9 Replies
View Related
Jul 16, 2014
I get some tables from SQL server but I like to add formula when the data transferred to Excel sheet
"Colum C" has date data from the SQL table
I have the below formula which I like to add into SQL code which can automatically work out the aged period on "Colum D" which is named as "Aged".
=VLOOKUP(TODAY()-C2,{0,"Current";31,"31-60";61,"61-90";91,"91-120";121,"121-150";151,"151-180";181,"181-210";211,"211+"},2,1)
View 8 Replies
View Related
Sep 30, 2013
I have created a macro file which will fetch the data from sql server. Here is the code
f Me.Cmbchoose.Value = "" Then
MsgBox "Please Choose From the drop down Menu!!", vbExclamation
Exit Sub
End If
If Me.Cmbchoose.Value = "Merchants Reports" Then
Dim oConn As ADODB.Connection
[Code] .....
The code is working fine. Now my question is that I want to access it from my home. How do I do that without DSN set up?
View 5 Replies
View Related
Jul 21, 2013
I have a table thats acting as a database analysing player data and I have a second table in a report sheet based on the database table. In my report table I have a drop down with the player names at the top and I want the data cells underneath to populate based on that particular players data from the database.
View 1 Replies
View Related
May 23, 2014
I am trying to build a staff roster. The staff rotate over a 4 week cycle. the name of the staff member, and their shift needs to be looked up from the key then matched with the particular week. the name and shift then need to populate specific cells.
I have attached the worksheet so you can see what i am trying to achieve.
View 2 Replies
View Related
Mar 18, 2014
I have a couple of spreadsheets that has several columns each containing several hundred thousand rows of codes. To quickly analyze this data, I am trying to come up with a conditional formatting formula to highlight the respective cells when specific values occur next to each other. A particular code will show up in many cells, but the code that is the respective adjacent cell is always different. I need to know when row A contains, for example, '9928559' and row B contains '36415RT'.
View 3 Replies
View Related
Jan 29, 2013
I am trying to create a user form that will allow the user to type int values in boxes. Then when the user clicks the submit button the code needs to add the values from each user input box to the existing values in specific cells accross multiple worksheets. Then the form needs to be cleared after the cell values are updated. I can create the form it is the code on the submit button i am lost on. Also it is important that some boxes may be left blank.
If you click the Grey "Qty Form" button on sheet1 the form will open. User data numbers can be entered in the blank boxes. When the submit button is pressed the form needs to add the user entered numbers to the numbers in the corresponding cells in sheet 1 and sheet 2. How to code the submit button to do this properly. Also after the data on the spreadsheet is updated the form needs to be cleared and start the cursor back in the Item 1 box on the form.
View 1 Replies
View Related
Oct 6, 2009
I am attaching an example sheet with this. I am trying to populate a range of cells in sheet1(from sheet2) based on value in cell A1 on sheet1. VLOOKUP brings only one cell value, I need to bring in a range of cell values in different cells on sheet1.
View 2 Replies
View Related
Mar 24, 2009
I have two worksheets. One worksheet is pulling in data from an OLAP cude. I have it configured as a pivot table. The other worksheet contains my dataset. Both worksheets are in the same file.
In my datasheet worksheet I would like to pull in data from the other worksheet. I would like to be able start a few cells and then drag so that it autopopulates the values. Here is the formula I'm using
='Affiliates Pivot'!$F10
='Affiliates Pivot'!$F11
='Affiliates Pivot'!$F12
it poulated with the values
23
45
64
then I select the 3 cells and drag so that I can autopulate the remaining values. It enters the formulas
='Affiliates Pivot'!$F10
='Affiliates Pivot'!$F11
='Affiliates Pivot'!$F12
='Affiliates Pivot'!$F10
='Affiliates Pivot'!$F11
='Affiliates Pivot'!$F12
='Affiliates Pivot'!$F10
='Affiliates Pivot'!$F11
='Affiliates Pivot'!$F12
what I really want is
='Affiliates Pivot'!$F10
='Affiliates Pivot'!$F11
='Affiliates Pivot'!$F12
='Affiliates Pivot'!$F13
='Affiliates Pivot'!$F14
='Affiliates Pivot'!$F15
='Affiliates Pivot'!$F16
='Affiliates Pivot'!$F17
='Affiliates Pivot'!$F18
Is this possible? How can I do this?
View 12 Replies
View Related
Mar 26, 2009
I have the following simplified example:
Table with three columns with a growing number of rows. The user enters data into each row, once user enters the last value and hits "Enter" on the final cell (column c) I want a script to evaluate the row and copy the entire contents of the row onto an existing different worksheet. The first column (A) contains the attribute that will be the condition that determines which sheet to paste in
For example, in my attached file, the first row contains the value "Square".
I want that row be copied and pasted into the 2nd tab of the worksheet (reserved for "Square" data) on the next free line. Simiarly, Triangles should be pasted on the thrid tab. Note however that i think the data should be copied line-by-line as the user enters it, which obviously isnt the case for the example dummy data, its just there to simulate my setup
View 4 Replies
View Related
Oct 22, 2008
if the state, city and company name are the same, I need to make sure the address gets populated in the address column. I have included an attached sheet to clear this up.
For example,
Row 1 is Crazy Horse Saloon in Anchorage, AK and has an address and phone number
Row 2 is Crazy Horse Saloon in Anchorage, AK and does not have an address and phone number
I need it to be able to realize that the State, City, and Business all match and populate the missing information.
View 5 Replies
View Related
Nov 14, 2006
I have a workbook that has a calendar look to it (in row 2 I have time in 30 minutes going from 7 AM, 7.5, 8, 8.5 until 12 AM). In sheet2 I have employees name in column A and their workshift in column B (07:00AM-03:45PM). I'm trying to have excel find an empty row to populate a "t" in sheet1 for the for the employees worshift for each associate without any overlap. I have attached a short sample of what I'm working with. Let me if there is a formula or a code maybe...
View 4 Replies
View Related
Jan 29, 2010
I am adding a sheet with a graph I made. There are two sheets, the first with the graph, the second with tables. What I would like to do is populate the graph based off what is entered into the tables. My main goal is to get the cells in the cells in the graph for each day to fill in color between the given time frame entered in on the table. Obviously I would be rounding up or down to make the time end in ":00."
The color I would like to fill the graph with is shown on the graph sheet. Also, if anyone can actually get this to work (I honestly wouldn't know where to start) Is there a way to have multiple colors and a possible overlay of colors?
Lets say on tuesday I have 10:00-15:00, and 12:00-18:00. Can I have two colors populate the cells and a thirs color populate the cells in the overlay which would be 12:00-15:00?
View 4 Replies
View Related
Jan 9, 2014
I have two spreadsheets, one is a Log Sheet for invoices that we have been printing out and filling in my hand throughout the day as our field technicians complete their work. The second spreadsheet has a sheet for each technician where we manually input the technician's invoice numbers and payroll for each job completed on that day.
What I'd like is a way to combine these spreadsheets so that instead of printing and filling in the first sheet by hand, I could input the invoice data and have it automatically populate the cells for the appropriate technician.
This is the running log we keep throughout the day:
2rp76ky.png
Then at the end of the day, we painstakingly transcribe the data for invoice number and payroll onto this sheet for each technician:
4vg6dk.png
What I want is for Excel to automatically fill in each technician's payroll log with invoice number and payroll time as we fill in the running log throughout the day, is this a doable thing?
View 1 Replies
View Related
Nov 17, 2006
Basically i am trying to auto populate cells using two dates as the parameters, set up is
A1 - Start Date
B1 - Finish Date
C1 - Jan 07
D1 - Feb 07
E1 - Mar 07....and this carries on across till the end of the year.
What i am wanting excel to do is to be able to put in a start date and finish date in to the relevant cells.....this then populates a fixed figure across in to the correct month.
Eg
start date 05/07/07
finish date 17/10/07
This then puts in the figure 0.2 in to each cell that correspond with each month....July 07/Aug 07/Sep 07/Oct 07.
So in effect it is giving a gantt chart but with data in it.
One more thing....the start and finish dates could well be out of the range.....
eg
so start could be 07/08/06 and end could be 18/04/07 which would mean that all of the fields would need populating.
View 9 Replies
View Related
Aug 22, 2008
If I type a VLookup formula in Cell A1, the resultset goes into cell A1, as expected.
Is there any way to have a formula in Cell "A1" that populates a different cell, like Cell A6 that contains no formula ?
The reason I need this is that the user sometimes needs to type in manual data into Cell A6 and would overwrite the formulas. I was thinking that if I could have them actually type something into A1, it would populate other cells, such as A6, that did not have any formulas.
View 9 Replies
View Related
Apr 3, 2009
I have five possible reps names in column A, when i type in "peter" i want that row up to column I to have a background colour of yellow, each rep must have his own colour. when i clear the name from column A the row should clear the colour. using conditional formating i can only get the first cell to get a background colour.
View 9 Replies
View Related
Jun 20, 2006
I need to create a macro, where the contents of a particular cell are dependent upon summing values based on a word desription from another column. For instance, I would like cell E10 to include a numerical value from cell D5, but ONLY if cell C5 is populated with the word "trust" as opposed to "equity". Conversely, I would also have a macro in, say, cell E11 that would do the same for the word "equity" in column C. I would like the macro to hold for the entirety of different words in column C.
View 6 Replies
View Related
Jan 31, 2014
I have a column that contains combined data of numbers and letters. I want to filter that column to exclude cells that contain the letter "d" or "f". I am trying to create a pivot table from the results of the filter to only display the ID #s that do not contain the letters "f" or "d".
The data inside the fields is not the same length and is not listed in a particular order. I have over 14,000 records I need to filter.
Data set example: The items in red are an example of the cells I would like to exclude from my worksheet. Is there a way to filter without deleting the data?
445-0706634F946
5886-K949-D001
445-0716622F946
445-0706634F887
497-0480473
445-9995967F025
6569-9788-2342
9016-1300
9016-C765-875
123-S765-87645
View 1 Replies
View Related
Jun 10, 2009
I want it to count and fill in a range in column A until it sees a blank or notices the change in value in column B. In the example below i hope it shows what i need to do. i left the last group without numbers to show that is where it needs to start counting over again. i am basically wanting to count down 1st place 2nd place etc.
View 8 Replies
View Related
Aug 31, 2009
I am looking for a macro which will take specific data from one sheet to the 2nd. I have attached the sheet. The Input data in the 1st sheet and the consolidated dat ain the 2nd one. Kindly assist. In the Final Sheet:
The Description column shld contain the data from B7:C7 and the B10:C10 together in one cell and that shld be copied till the end
The Description (Design steps) and Expected Result coulmn shld take data from the Test Step Description and Expected Result. And the Step Name shld be counted automatically till the last input. Test Name column shld be the 1st woksheet name.
View 4 Replies
View Related
May 14, 2009
I'm creating a spreadsheet for work, which for security reasons requires certain information to be locked except to administrators. However the cells need to be open for inputing information for everyone until the administrator enters specific data.
Completed Date Time W/R No. Acc. No. Priority? Vunerable? Comments Closed Date/Time Yes 14/04/09 11:30:00 1234567890 8890976 Yes Yes N/A 14/04/2009 11:30
What I am looking to happen is once an adminstrator selects 'Yes' from the drop down menu on the Completed column, for that row of data to be locked for editing, unless unlocked later by an adminstrator.
View 9 Replies
View Related