Macro To Highlight Data Inside Other Data Or Move From Book To Book
Jul 16, 2014
so to start off im not able to attach things due to security reasons, what i need is either 1 of 2 macros. if its possible, both are related. one possible is as follows: i need it to go through a certain column (say I for example) and look at the information in it, this information can vary from peoples names along with dates and other stuff, i want it to look through these and if anything has a date today and prior i need the cell to be highlighted. problem is sometimes it might have 2 dates, or no dates. it should have todays date, their name, other information, and future date of something. but not everyone does, this is the macro i dont think that can exists.
2nd macro possibility the other macro uses the first sheet, AFTER been highlighted, normally by hand, and takes it to another workbook and puts in in certain spots. so the first sheet has names of everyone in column K. what i need is it to look at column I and if its highlighted take entire row to other book, and put into sheet under the person name in their tab. the second book has a tab for each person (at this time 18 tabs) which can fluxuate, and each tab is the persons first and last name, without spaces. since when i put sums on main page it didnt want to work with the spaces i had to omit them. again im not sure this is possible.
i have done a search on this topic and found many similar answers to many similar questions. All specify using Application.Run "workbookname.xls!macroname".
In my code, the filename has an assigned value as the master code goes out to many secondary files - the user selects the particular one they want at the start of the macro. The variable assigned is called "UpdateKAMsFile".
how do i get the macro called KAMsRandomColour to run in the workbook designated by UpdateKAMsFile?
Got an issue that I can only seem to do with things like the program Hotkey and making physical macros. I'm sure it is easy but I'm lost.
I have data in one book that looks like this (Call it Book1)
Date: Service ProviderReason for callCRM SR #DM SR #WO #Device #Serial #Issue15/02/2010DATE: 03/02/10 TIME: 11:29 BUS: 1234AO ISSUE DETAILS: Issue with Console
and data in another book that looks like this (Call it Book2)
DeviceSerial NumberNameTerminal PositionTerminal Group Location DescriptionTerminal IDDescription Service Provider 104012343030123456ConsoleDriver Console1234AO90401234Service Provider Name found Here
I need to find the BUS: 1234AO from the cell in Book1 then look that Bus up in Book2 and then from Book2 copy the Device, Serial Number, and Service Provider into the cells into Book1 and repeat this infintely often. The problem I have is the the bus can have 1 Console and 1-5 Readers and I need to find that data also. So for example I need to find BUS 1234AO and get the Console details and past that into one issue and the next issue will have the same bus number 1234AO but I need the details for Reader2 (that detail is in the Name field as shown above.) The issue details will always have the Console text and Reader# text in it.
The problem I have is that the Reason for call cell has ALT-ENTER characters in it and the details are not always in the same spot but the details are almost always in the format ####AO (four numbers and the letters AO)
I have done this once already, so I know its possible but I cannot remember what it is called and how to do it.
I have a "form", I open it up, fill out a few different things, and then save and print it. When I save it I want it to take a few different cells information and report it into a seperate workbook, without having to open the report workbook. I use this seperate workbook to reference when I fill out the form and who it was sent to.
I remember there was a wizard that I used to get it to do all this, but I can't for the life of me remeber what it was.
I have a code in which we can split the data using column values into new and same sheet also. I want to modify this accordingly to my need but i am new in VBA so can't modify this. i want 2 changes in this macro:
1. I want to set a value (Like:"Resolved"," In Process" ) in the macro to extract the data related to the value only. Means, when i run this macro it will extract the data only for "Resolved" status. I have to create two macros for each defined status.
2. After splitting, it will ask me to save the new workbook location.
3. Save it.
The codes i m having are :
First code to make directories:
Code: Public Type BROWSEINFO hOwner As Long pidlRoot As Long pszDisplayName As String lpszTitle As String ulFlags As Long lpfn As Long
iMaxRow = 5000 Dim subj1 As String Dim subj2 As String For iRow = 1 To iMaxRow
For now, i've disabled the on error resume next. Also, the input column a has 4 numbers followed by string, while the corresponding output row header only has the 4 numbers, hence I tried matching with the wildcard.
I've had a scan through the archives trying to find a post or item on importing Outlook data to Excel, and have so far only found articles on importing data from users' 'Contacts' lists. I need functionality so that when the user selects an office (e.g. 'London') from a list, further details for those offices - which are stored as individual members of the global Outlook addressbook - for example postcode, can be operated upon.
Because this data is relatively dynamic (e.g. potential for relocation of office premises), I need any procedures to refer to a single unified data source, therefore I'd like any VBA procedures to use data directly from the outlook address book, instead of importing a static copy of the data and then performing operations on this.
I have a cell that I want to use data validation on so I have a drop down list. Problem is the location of this list will be in another workbook.. Is this possible to go from one workbook to another using data validation?
Also, depending on the information that is selected from the drop down list I want a cell to the left to pick the corresponding data from the list in the other workbook. These forms will always be in the same folder.. Not sure if that information is necessary but just in case you need to know.
I have built a data entry form (Input tab) and have code populating a table (Table tab). Currently both are in the same book, but I would like to house them in separately.
What is the proper VBA syntax for this? Will both books need to be open in order to populate the table?
The 'real' data is hosted on sharepoint and is getting darn big. The result is problems opening the doc and looong save times. My thought was to have the secretaries doing data entry open a single sheet (Input Form) which will then populate the data in another sheet. I'm dreaming, aren't I...
I know Access would solve everything, but for cost reasons I am stuck with Excel.
I have managed to use ADO to copy data from a closed book to my active sheet. Problem : it copies only the text, and not the dates or figures...
Sub TestReadDataFromWorkbook() ' fills data from a closed workbook in at the active cell. GetDataFromClosedWorkbook "H:P&LYE TempDiv P&LP&L Report 020312.xls", "A1:Z1000", Range("A1"), False End Sub
Sub GetDataFromClosedWorkbook(SourceFile As String, SourceRange As String, _ TargetRange As Range, IncludeFieldNames As Boolean) 'GetDataFromClosedWorkbook "C:FolderNameWorkbookName.xls", "A1:B21", ActiveCell, False 'GetDataFromClosedWorkbook "C:FolderNameWorkbookName.xls", "MyDataRange", Range("B3"), True
I'm transferring data from one workbook to another. The first workbook ('Request Form') will always have a different file name depending on which user is saving it. However, the worksheet within that book will always have the same name ('Tab A'). Workbook and worksheet 2 ('PTS' and '2008' respectively) will remain the same.
Basically I want the macro to open 'Request Form' (whatever the name, wherever it's saved) and stay open as the rest of the macro runs. I need that file name to be a sort of wildcard, since the file path and file name will never be the same. How can I do this?
Dim TabA As Worksheets Application.GetOpenFilename Application.ScreenUpdating = False Set wbOpen = Workbooks.Open("Request Form.xls") --THIS NEEDS TO BE A WILDCARD 'Declares the ClientName Sheets("TabA").Select
I would like to know if there is a way to copy a spreadsheet and paste it into a new tab on another spreadsheet. We currently download 2 lots of spreadsheets from SAP and would like to create another spreadsheet to act as a 'central' preadsheet. What I would like to happen is that the data from the 2 downloaded spreadsheets will be automatically pasted into 2 new tabs on the central spreadsheet, then run some formatting macros (which I can do fine).
I have a macro that I would like to run on every worksheet in my book (over 100 sheets wide). As it takes about 20 secs to run on each sheet, and I don't want to click from sheet to sheet, how can I make it run on every sheet in the book? And no, they aren't named sequentially, either alphabetically or numerically.
is there a function in Excel to return the number of sheets in a book?
I'm having an issue with a macro that copies sheets from one workbook into a new workbook. The issue is it doesn't copy all the sheets. It only copies the first 10 and doesn't capture the the remaining 15. I've checked the range of the translation table and the issue doesn't appear to be there.
Sub SBGFiles() Application.Calculation = xlCalculationManual Application.DisplayAlerts = False Application.ScreenUpdating = False Dim a As Worksheet Set a = Sheets("Input") Dim Fpath As String Fpath = ThisWorkbook.Path & "" Dim SBG As Range Dim RU As Range Run ("UnPro") For Each SBG In a.Range("B44:D44") Workbooks.Add newbook = Workbooks.Count Workbooks.Item(newbook - 1).Activate On Error Resume Next
I have a macro that used to create a new book for each of the worksheets in a workbook that would name them the same as the worksheet.
Since our company upgraded to Windows 7 the macro, more often than not, fails to work.
The code for the macro is
Sub NewBook1() ' Set wbSource = ActiveWorkbook For Each ws In wbSource.Sheets ws.Copy Set wbDest = ActiveWorkbook wbDest.SaveAs strSavePath & filePrefix & " " & ws.Name & " " & fileSuffix wbDest.Close Next Application.ScreenUpdating = True ' End Sub
I have several similar documents open. They each have a macro with the shortcut CTRL + SHFT + T. The problem is each macro is different for each book. When I am working on book X, I don't want macro from book Z to run, but it does.
I need to get this macro to process the cells for every worksheet in a book rather than just the active one
Public Sub test() Dim Lr As Long, i As Long, x As Range, _ v1 As String, v2 As String, v3 As String Set x = ActiveSheet.Cells.Find("*", searchdirection:=xlPrevious) If x Is Nothing Then Exit Sub Lr = x.Row Application.ScreenUpdating = False For i = Lr To 1 Step -1 v1 = Cells(i, 2) v2 = Mid(Cells(i, 3), 1, 1) v3 = Cells(i, 4) If v1 "OP00" Or v2 "L" Or v3 "CC" Then Cells(i, 1).EntireRow.Delete Next Application.ScreenUpdating = True End Sub
At job, Mac OSX and Address Book 4.0.6 with contact info including in many cases emails. I'd like to get it of there, into Excel to manipulate, and ultimately into a FileWrecker Pro database. How to export 1087 entries from Address Book including only selective data fields is the question, and I know that's "slightly" OT, but I do want to import into Excel, so I hope that vindicates me! If not, and you can point me to a good MacForum, I'll settle.
I am struggling to find a macro which can look at a name in column 'BT' and search it in the address book of Outlook to then place the email address of that person in column 'ED'
There are 35,000+ people in the address book and there may be over 5 email addresses for one name, so is there any way a message can appear for the user to select which email address is correct if there is more than 1 contact for that name?
I have a large amount of data on NBA teams and players that is extracted from external web pages. In order to have the data shown on separate sheets to do comparisons I have to use many array formulas and from what I have read that takes up a large amount of memory. I'm now at the point where I'm receiving a message that says "Excel cannot complete this task with available resources" when I open the workbook.
Is there any plausible way that I can resolve this situation? I have thought about converting the lookup formulas from arrays (index/match) to vlookups and hlookups.
I'm not as advanced with using Excel as most of you, and I realize I may be at a point to where I will need to use different software to analyze my data, but I would prefer to stick with Excel as it would be difficult to start from scratch and learn how to use a different program.
I am looking some suggestions for a good book i can buy online to learn about writing VBA for excel. I find this forum very useful for help on solutions to write VBA code but i would like to learn the basics so i can understand what it is i am adding into my excel files. Moderators... If this breaks the forum rules (i've read them and can't see anything).