I have a question with vba coding in excel. There is a Refresh button in my Excel Sheet. Once I click Refresh button, I fetch data from another application called Siebel. I am able to go this far. I fetch multiple records from Siebel.. I need to add them all in excel sheet. I get five columns for each record I get from Siebel. I need to add them accordingly to excel sheet.
example of a database user form that will allow me to list records in a sheet as well as search for records in a sheet. I know excel has a built in feature for this but it is menu driven and I need something that is button driven and will allow me to resize the form layout. I was not able to figure out how to do that with the built in form.
I have an issue in comparing 2 dates. It gives a data type mismatch error
Private Sub TextBox12_Click() Dim siebApp As SiebelWebApplication Dim siebBusObj As SiebelBusObject Dim revBC As SiebelBusComp Dim isRecord As Boolean Dim sRep As String Dim sCompany As String Dim sLocation As String Dim sStep As String Dim sProb As String Dim sDate As String Dim CurDate As Date Dim RetDate As Date Dim datmins As Integer CurDate = Now() Const DateCol = 9 RetDate = ThisWorkbook. Sheets("Users"). Cells(DateCol) r = ThisWorkbook.Sheets("Users").Cells(65536, 1).End(xlUp).Row 'Get next blank row ThisWorkbook.Sheets("Users").Cells(r, DateCol) = CurDate....................
I have highlighted in bold where i do the date comparison. Here are the date formats [Last Updated] = 2002-11-08 13:19:03.000
I'm trying to write a macro in Excel that will search certain values a Siebel database. I'm already working with a macro to ADD data to the database, so I have all the connections taken care of. But now I need to pull data from it. In looking for how to do this, I see the setsearchspec method that I need to use to set up the search then the ExecuteQuery to run it to get the pointer. But before that, I have to create the referencing object. I've noticed in several examples here and on a couple other sites, these two lines:
Set busObject = SiebelApplication.GetBusObject("Revenue") Set busComp = busObject.GetBusComp("Revenue")
So here's my question: in all of the examples I've seen, they used "Revenue" as the argument for these methods. Does it really matter what we use there? Or this just essentially a place holder? I've looked at some of the online documentation and was unable to glean an answer from that.
I have 2 excel sheets with records of email addresses. Excel Sheet A , Excel Sheet B.
I want to exclude the email addresses of Excel Sheet B from Excel Sheet A (if there are similar records I want to remove them from excel sheet A)how to do this?
I have a sheet with the pricelist and a sheet with the actual price offer. I would like to copy selected Items from the price list to the price offer. I dont want to do that by copy and paste method. I would like to create check boxes, so that I can check / uncheck each Item I want to be copied and then press the button copy to the price offer ... how can I do that. I asssume I would need a macro for that. The columns in the pricelist and the price offer sheet will be identical of course.
I have a new request concerning my warehouse managing.
I am getting back to this thread [URL]....
The request is as follows: When having the list of all the shelves, I'd need to create a new sheets with following data in a single column
shelfcodequantity
reporting in order all the shelves with code and quantity.
My idea is as follows: 1 - to create a sheet with all the shelves 2 - to create a function that reads in this sheet the name of the first shelf, then searches in other sheets the shelf and copies to a result sheet all the records found 3 - then passes to the following shelf name 4 - and so on, until the shelves lists ends.
Please note that in each sheet I have these data in two columns.
I am using the following code to remove duplicate records from a sheet:
[Code] ....
It successfully removes the duplicates (based on Columns A and B), however it is changing the formatting of the cells and messing with the conditional formatting I have on the sheet.
i use excel in my dispatch office. i am working on a new workbook and could use some help. In one sheet of the workbook we enter in customer calls. i would like to keep customer records in another sheet, which would include their address, phone numbers, and past invoice numbers all on the same row of the customer database sheet. At the top of the sheet that we enter caller information i would have a table set up to automatically fill in the customer info based on the name typed in,
if the customer exists in the customer database sheet of the same workbook the table will automatically fill in their address, phone number and past invoice numbers. i was thinking something like this =IF(COUNTIF('Customer Database'!A:A,Blanks!D6)>0,'Customer Database'!A2,"Not Found") ....the problem is that no matter who's name i enter, it will always add the information from row 2 of the customer database sheet. i need it to take information from the corresponding row(if customer name is found on row 45 then my formula needs to enter the info from row 45, not row 2. not sure how to do this.
I've a sheet that records performance on individuals, what it does is collate the performance daily on certain things.
Most are simple plus/minus one and i have control buttons that do this,what it does is: On click it adds one to a different sheet, or if to remove it minuses one, and there is a total box to sum these figures.
But there is also some provision to add collected money value, and what i would like to do is have a function that deletes the last figure added to the financial transactions This is the code If Target.Address = "$A$6" Then Sheets(2).Range("A65536").End(xlUp).Offset(1).Value = Target.Value
So for example in A6 £10.50 is added, but i can't think how i can provide a service that will delete the last figure in Sheet 2 range A, as this will be constantly changing.
I get some records from XML and display in the sheet. Now, I need to put an image for each record in the sheet while displaying records. And also on click of the image I need to have some code to be executed.
I need to create a new sheet, and pull all the rows (14 columns each) from another sheet in the document that meet a certain criteria. Fortunately, that criteria is all in one column; unfortunately, out of about 30 different entries in that column, I need it to pull 7 of them, 4 of them have been input 2 or 3 different ways.
I know I can go through the list of 900+ by hand and copy the rows, but there has to be an easier way right? Here is the list of all the spellings of the ones I need to pull..
D.C. DC DPM DPT Ed.D EdD EDD JD Ph.D Pharm. D PharmD PhD
anyway to insert excel records into another excel file ?
like when I press button in the first excel sheet its copy and add the selected records into another excel file in addition to the previous records i had inserted
I've got a master excel sheet with about 6000 rows of unique variables. In separate source files, I have many rows of these variables with information next to each. Each file has a random number of these variables, some a couple of hundred, some a thousand or two.
What I'm looking to do is to have the master sheet with all 6000 rows and have all of the information next to each variable, with new columns for each new bit of information.
I could sit there for hours copying and pasting each new bit of information to the relevant variable in the master sheet, but I'm convinced there's a quicker way. Is there, for example, a way to filter the master sheet based on the variables contained in one of the source files and therefore (once a-z sorted) copy all the information from a source file and simply paste it into the master file? Then once the filter is lifted the same can be done for the next file (there's only about 20 source files so that's manageable).
I have a range of columns i.e. 23 columns (i.e. B through X). Someone can write records in these columns (starting from B21).
Duplicates are considered the rows with similar data in columns 3 and 11. I know about the removeduplicate method and works really well but i want the duplicates not to be removed. Instead another column shall be checked for date of entry (user will entry date in format dd/mm/yyyy). The newest entry will change the value of the cell in column 4 (islatest column)to TRUE while all other records will be FALSE. This will work with the filtering of data on a pivot table on another worksheet.
Book1 and Book2 are workbooks that I have modified in order to protect private information.
Book1 will have 11,000 records (my example Book1 has only 100). I need to rearrange Book1 such that it looks like Book2. Book2 has 20 complete records from Book1 combined into one single row, and my example Book2 has populated 3 rows only (3 rows x 20 records, making 60 records now appear on 3 rows only).
Macro for getting Book1 to Book2? 11,000 records in Book1 will take a lot of hours to transform into Book2 unless a macro can do the job for me.
I am working on a excel sheet that tracks thousands of records. Basically, have 400+ employee's who have scores that need to be tracked. The scores are % based... to start we have 15+ columns but all that matter for these calculations is probably 3. We have score 1 which their required to hit 90% score 2 which is 80%, they are seperate scores. Some people dont count so we disqualify the formula from counting a 0. My current forumla is...
COUNTIF(K418,"<90")+COUNTIF(N418,"<80")-COUNTIF(N418,"=0") where the rows change for each record. We are counting the # of times they don't hit their goal. They can only be held accountable for one score a month not for both scores so created a 2nd column which has =IF(O418>=1,1,0) so if it came back with 2 counts it changed it to 1. OK, so background explained
Now the tricky part... we have a running total per month of how many times they did not hit their goal. We have a column with the mm/yyyy. So we have a pivot table which breaks down the associates by name department etc... and once completely drilled down into it gives a breakdown of their score for every month and then if they did or did not hit their goal by referencing the previous field I discussed. Currently it has a running sum, but I am stuck on the twist I need to throw in... if they meet their goal for 3 months straight, 1... we will call it "occurence" drops off. So for example.... Jan 1 Occurence, Feb 0, Mar 0, Apr 0. So in this case, Jan, Feb, Mar need a running total of 1. Once april hits, the running total needs to go back to 0. So if they got an "occurence" in May, the running total would go back to 1 instead of the current 2 my sum shows.
I imagine there has to be some way I can do this, but I have been thinking about this and hit a brick wall. Any idea's at all? For reference column A is the mm/yyyy (which can be reformatted differently pretty easily). Column K is score 1, column N is score 2, those are the 3 fields I reference for my forumulas currently, the pivot table uses everything else.
Here is an example of one associate.... the top row is the average for the associate and the sum of "occurences"... I want to or plan to have a running total section added on the side however if possible. This associates running total should be 2 instead of 3 as there was a 3 month gap for Mar, Apr, May so it would have been -1 in May as explained above.
I have a created recording sheet (attached) for the purpose of recording moths. I send this sheet out to those recorders who live in my county and at the end of the year they send the filled in sheet back to me. Over time I have put safeguards onto the sheet to ensure that I get the cleanest data returned to me. However, there is still one area which is giving me problems - users entering duplicate records.
Some formula which will stop recorders from entering those duplicate records. There are many columns on the sheet which recorders have to fill in with information, but as far as the duplicate records are concerned it is where the same information is entered into columns C, F and J that I'm having a problem with. It would be great if, when the same information was entered in these columns that the affected cells were highlighted in some way and if an error message appeared saying 'Duplicate record, either delete or alter grid reference'
I have entered two test duplicate record on the 'macro moths' sheet of the attached file : Test Recording sheet.xls‎
For Each Ws In Sheets(Array("SHEET101", "SHEET102", "SHEET103", "SHEET104", "SHEET105", "SHEET106", "SHEET107", "SHEET108")) With Ws
Finalrow = .Range("A65536").End(xlUp).Row Set CpyRng = .Range("A2", .Cells(Finalrow, "AR")) If Finalrow > 1 Then CpyRng.Copy Sheets("Master").Cells(Rows.Count, "A").End(xlUp)(2) End If
End With Next Ws
Basically what it does is simply combine all the records in the the mentioned sheets to the master sheet.
There is a little problem. When one of the sheets are on a filtered mode, the data copied in the "Master" sheet are only visible cells.
Un-filtering before copying is an option (i.e. putting the code ".ShowAllData") IF I can put the exact filtering back after copying. Reason being that the sheets are owned by other parties and they do not want their own filtering be removed.
I have 1 workbook, with 3 sheets. Sheet1 (EVER) has 3000+ rows and 12 columns of customer information. This sheet is for all customers who have ever placed an order. Sheet2 (06-07) has 1500+ rows and 12 columns of customer information. This sheet has all customers who have placed an order in the last 2 years. Sheet3 has 1 row, which consists of the column titles (12 columns) that are on Sheet1 and Sheet2. I need to put all customers that are on Sheet1, but not on Sheet2 in Sheet3. I have tried VLookup; advanced Filter and a number of codes in the last 3 days and have not been able to figure this out.
I have a dataset with 5 columns. i want to identify the the max users in each zip code and the corresponding ID for it. For e.g. for zip 01105, max users are 1380 for ID 010840. I want my final data to have just these 3 values.
I tried the pivot table but it hides the ID corresponding to the MAX value.
ID Zip CityState Users 01084001105SpringfieldMA1380 01012001105SpringfieldMA1102 01003001105SpringfieldMA518 01145001105SpringfieldMA27 01384001105SpringfieldMA3 01084001107SpringfieldMA629
creating a formula to count the number of rows in a different worksheet if a cell has a value of "1" or "2" (these are the only two allowed values) AND a status of "'on track". also need to add values in other cells within the different worksheet if the value is "1" or "2" AND has a status of "on Track".
I have a problem in excel that is very urgent to resolve. I have a table that contains duplicate records e.g two people living at same address. I want to merge those records whose address field value is same. Find attached an excel sheet that contains the exact data and the exact output that I want. I know it requires VBA coding.
i have cell N1 witch is a number example "8832" cell O1 is text example "state street" now i have A1 thur A10 as an address "number" now E1 thur E10 is street address "text" i need to take n1 match it to A1-A10 then take that row number and see if E1 of that row numbers matches O1 if it does that that row numer and get g of that number if not keep checking to i find a match
I have 2 workbooks Mater and Update. I have a VBA code that compare between the two files column by column and update the Master file according to the Update file ( the code below).
Now my user want to see in a separate worksheet ("changes") only the changes - Date and time of changes at column A , old value at column B and new value at column C ........
I have a large spreadsheet and new data is added periodically.
I have several columns of data associated with a description & date.
The data associated with each description is unique to that day.
I want to archive the older desciption data after I add newer description data.
Column B = date of the data Column E = description (phrase)
How do I remove duplicate older rows of description data from my main spreadsheet (keep the newest descriptions rows) and save the older rows of data in a archive sheet?
My sheet has many columns from A to BU.
I have about 220,000 records with many duplicate Descriptions in column E. Each Description record has a date in the Date column B.
Records are sorted by: Description A to Z then by: Date Newest to Oldest.
Here is an example (not actual sheet):
I highlighted the duplicate Description records in these examples that I want to update and archive.
I want to delete the older Description records from my main sheet so that only the duplicate Description records with the newest date remains like the example below.
And the older duplicate records that are removed from the main sheet I would like to save to a new sheet so that I can save a history of the Description records.
I have 2 worksheets. Sheet 1 has in column B a single ID number in every cell, Sheet 2 in column A can have multiple numbers in a cell (e.g. "55517 / 55518 /55519" written in one cell.)
For every row in Sheet 1, I need to find the ID in Sheet 2 and add in column C in Sheet 2 the corresponding cell value found in column E on Sheet 1.
By doing this formula, when I am in Sheet 1, I can already find the row number in Sheet 2, if it exists.
I suppose I can then move to the destination cell by using OFFSET.
This is all I have been able to figure out conceptually.
I think it makes more sense for this to be in VBA. Especially the 'writing part' I don't know how to do. After the OFFSET part, how do you tell Excel to write something to that cell?
Because several IDs from Sheet 1 can occur in Sheet 2, it would have to add like REPLACE at the end (ie. len(cell)) "+result", so they get summed if there are multiple finds.
I am also not sure the MATCH sentence above can be translated as a Macro, or whether it is even an efficient way.
And finally, it has to loop (repeat for every row in Sheet 1), which must require VBA.
I've a worksheet with a list of destinations and country code as well as Y/N fields. I want to create a solution such that when I change the yes/no field for one destination, all other destinations with the same country code will follow. I have attached my work file below.