Note In Another Workbook Cell
Nov 20, 2009
I am trying to run this macro and I get always an "Error 1004" with the select instruction. The aim is to put a note on the same cell in the same sheet in a second (NewFile) workbook and highlight it.
Here is the
Sub FetchNoteinNewFileActivecell()
'
' This macro highlights in red the cell in the NewFile corresponding to the selected cell and adds an empty comment
' Warning: this works only if there is a sheet in the target (NewFile defined in range in Sheet1) file with the same name as the active sheet
'
Dim NwFile As String
Dim CurrenCell As String
Dim CurrenSheet As String
View 9 Replies
ADVERTISEMENT
May 28, 2013
I have a range of cells containing text values in BS15:DS50000.
What I want to do is look at each cell in the range BS15:DS50000 and if the cell contains the "" character, then populate text from column BH (if any) as a cell note.
For example, if cell DB42 contains the "" character somewhere within its text, then populate the text in BH42 as a cell note within DB42.
If BH42 is blank, then no cell note. (Also, if DB42 does NOT contain a "", then no cell note either.)
View 2 Replies
View Related
May 14, 2009
My formula is : =SUM(C8:N8). How do I add a "note" as opposed to a comment to this formula?
View 3 Replies
View Related
Jun 6, 2009
i have note pad file. for your kind information i attched the note pad file i like to convert this note pad file to excel. i want each coloums and rows separate separate same like note pad in xls.
View 5 Replies
View Related
Jan 12, 2009
What I am looking for is whether or not there havebeen at least three, uninterrupted true cells in that particular column. The time is based off of the last time in that string that the cell returns a true statement. For example: O-Data returns 12:46:00 PM because there aren't any true statements in any of the other three columns between 12:43:00 PM and 12:46:00 PM and there are three true statements in that column.
M-Data does not return a time at 12:42:00 PM, because at 12:39:00 PM there is a true statement returned in the L-Data column (This is what I mean by interrupting a string).
View 14 Replies
View Related
Jun 3, 2013
I need to make all cells that have a 'Note' in them 'yellow'.
this will be for the entire workbook.
View 9 Replies
View Related
May 21, 2006
I've attached two separate workbooks that have indentical sheets in each. One workbook is a 2 day later update of the first. I'm trying to develop VBA code that will open both workbooks uses column B (work order #) as the unique identifier for each like sheet (which represent a month) and compares all other columns for that unique indentifier. Then I need to generate 3rd workbook that is identical in format (has a sheet for each month) and content to the two source ones but shows the unique identifier and any changes:
Column A (due date)
Column d (order quantity)
Also,if in the newer workbook(5_12_06) there exist a unique indentifier (work order #) that was not in the older workbook(5_10_06) and the same if there exits a unique indentifier in the older workbook that was removed in the newer workbook.
View 2 Replies
View Related
May 28, 2013
below is the code i use to create a lotus note email.
i would like it to display my email and send it manually instead of sending out automatically.
' Open and locate current LOTUS NOTES User
Set Session = CreateObject("Notes.NotesSession")
UserName = Session.UserName
[Code].....
View 4 Replies
View Related
Jul 8, 2009
I have a macro that needs a major improvement in performance. I have a Quad Core 2.67GHz single processor computer and with the current logic it calculates 20 values per minute. I have data sets that can be up to 400,000 data points, which means it will take 333 hours. The attached Sample file has over 9000 point. For this data set it takes 7.5 hours.
The core logic of the macro is to extract what I call “Break Point” into column M and “Time Difference” between the Break Points to column O.
I got the code from this forum (thank you DonkeyOte) and made some modifications. The modified logic does the following:
1) The user inputs the starting cell. In the Sample I use G200.
2) From cell defined in button, It moves down one cell in that column and compares that value to the original cell.
If the value is greater than original cell then there are 2 possible outcomes:
a) move down 1 cell in column and if that value is less than original cell, then extract that value and copy that value to the column M (Break Point value) and copy the Time Difference Value to column O. “Time Difference” is calculated as the difference between the 2 point breaks in Column A. In this case I’ve hardcoded 0.003472222 to get 5 minutes which matches up with each incremental time in column A, but I would like the Macro to automatically calculate that by the difference between Column A values.
b) move down 1 cell in column and if that value is greater than original cell, then move down again, until find lesser value than original cell. Once we find value less than original cell, extract value and copy value to column M and copy the Time Difference Value to column O.
Once lesser value has been copied to new cell, logic is now:
a) move down 1 cell in column and if that value is greater than original cell, then extract that value and copy that value one cell to column M and copy the Time Difference Value to column O.
b) move down 1 cell in column and if that value is less than original cell, then move up again, until find greater value than original cell. Once we find value greater than original cell, extract value and copy value one cell to column M and copy the Time Difference Value to column O.
At any point in the process if we find a value equal to the starting cell, we ignore it and the logic continues. The logic continues flip flopping like this to the last value of column G.
OR
Here's the logic now in reverse I need:
If after moving down 1 cell of original cell, the value is less than original cell then logic has the following 2 outcomes:
a) move down 1 cell in column and if that value is greater than original cell, then extract that value and copy that value one cell to column M and copy the Time Difference Value to column O..
b) move down 1 cell in column and if that value less than original cell, then move up again, until find greater value than original cell. Once we find value greater than original cell, extract value and copy value one cell to column M and copy the Time Difference Value to column O.
Once greater value has been copied to new cell, logic is now:
a) move down 1 cell in column and if that value is less than original cell, then extract that value and copy that value one cell to column M and copy the Time Difference Value to column O.
b) move down 1 cell in column and if that value is greater than original cell, then move up again, until find lesser value than original cell. Once we find value lesser than original cell, extract value and copy value one cell to column M and copy the Time Difference Value to column O.
Again, at any point in the process if we find a value equal to the starting cell, we ignore it and the logic continues. The logic continues flip flopping like this to the last value of column.
Once all the Break Points and Time Difference between Break Points are extracted for each value in column G, the AVERAGE, STDEV and MAX values of column O are calculated in column Q, R and S.
There is a loop that controls the execution of the core logic until the last value in column G. In the macro I’ve hardcoded last row being 9171, but I’d like the Macro to figure out what the last row is automatically.
I know this description is a bit long but I’ve worked for many hours on getting it work properly. I just need some help to make it run much faster. I hope someone can help me out on this. I have the right logic, just need the speed now and I really can’t figure it out.
Attached is a sample files demonstrating showing how the logic to flips back and forth as moving down the column starting in cell G200.
The sample shows the results first 4 loops (Rows 200 to 203). The values in M and O are the results of the fourth loop.
Again, assistance is very much appreciated because I've taken this as far as I can with my limited experience.
EDIT - I can embed the Macro, but it'll probably much easier to actually see it in the sample file.
View 14 Replies
View Related
Apr 14, 2007
It also renames the CommanBarPopop with the new filename.This allows the user to open both Projectworkbooks/files (If required) and load each CommandBarPopup for different filenames .Therefor opening the Userforms and worksheets for the CommandBarPopup clicked ...
View 9 Replies
View Related
Mar 11, 2014
I have 2 workbooks. 1 is where data is entered called wksPB, the other is like a database workbook. The wksPB has data to be feed from column B to F and there is a dropdown.
what im looking to do is, if the combobox value is selected as Decline then it should display a messagebox that reference value in cell B is denied. if combobox value is Agreed then the macro should search the database workbook for the text entered in column b of wksPB and then copy data of C:E of wksPB to H:J of database sheet where that text is found and also the approver name in wksPB C24 to the approver cell of where that text was found. I've reached till finding the text but what I get my head twiting on is how to copy the text from wksPB column B:F to database sheet column H:K. Im attaching the sample workbooks and the code where ive reached till.
[Code] .....
Attached Files
Replacement Records - 2014.xlsx‎
forum file.xlsm‎
View 1 Replies
View Related
Mar 14, 2013
On one workbook I have "column A" that lists serial #'s, one serial number per cell. What I need is to be able to take all the non blank data from that column and copy it to another workbook with all those serial #'s in 1 cell numerically sorted and separated by commas.
View 1 Replies
View Related
Jun 20, 2008
I'm trying to figure out a way to find a specific sheet in a workbook that does not contain the macro. Within the macro I have a cell which holds the name of the specific sheet I would like to find but I can't get it to work for some reason...
'Dim officen As Integer
'Dim thiswb As Workbook
officen = Range("A2").Value
Set thiswb = ActiveWorkbook
' Open the Active Info file
Workbooks.Open "C:My DcoumentsActive 20080616.xls", , , , "xxxxxx"
' Dim sourcewb As Workbook
Set sourcewb = Workbooks.Open"Active 20080616.xls"
Sheets("officen").Select
RowCount = ActiveSheet.UsedRange.Rows.Count
Range("B2").Select.............................
View 8 Replies
View Related
Aug 4, 2009
I need to create an automated process to copy data from book1 and book2 and paste it in another workbook called book3. I want vba code to do this task whenever I open my book3
Book1
Location: G:FUTOMS-phases - eTD and TDReference Infoook1.xls
Data to be copied: Entire Rows 6 to 12
Paste: Book3> Sheet1
Book2
location: H:OptionsInfoook2.xls
Data to be copied:: Entire Rows 1 to 5 & rows 10 to 15
Paste: Book3>Sheet2
View 14 Replies
View Related
Feb 15, 2013
Here is the scenario: I have workbook called Leads_2013-0215 it has about 10K records I have workbook called LawFirms it has about 4K records.
If the value in Column I in Leads_2012-0215 is present in column G in LawFirms, I want to add the value Law Firm to column AV in Leads_2012-0215.
View 2 Replies
View Related
Sep 28, 2012
I have two workbooks open. I need to "Save As" and close workbook 2 with a file name from a cell in Workbook 1. The macro is running from workbook 1.
I'm guessing a change in the last line. I don't know what Dim means either.
Dim FName As String
Dim FPath As String
FPath = "G:"
FName = Sheets("sheet 1").Range("A1").Text
ThisWorkbook.SaveAs Filename:=FPath & "" & FName
View 1 Replies
View Related
Apr 25, 2013
I have a workbook that is used to calculate values from various data etc. On completion of calculating the values, eg. £20,000, I want to put the values into specific cells of another workbook template. I can of course do it manually by selecting the cell of the template workbook and do an = then reference the the cell in the calculating workbook.
What I want to happen when all the calculations are complete is that:
1. A new workbook, based on the template, is opened and saved with an appropriate title
2 The values from the calculating workbook are automatically entered into the new (saved) workbook at specific cells
View 1 Replies
View Related
Nov 24, 2007
I want to open an excel file whose name is a value in a spreadsheet, and then pull a value from the spreadsheet I queried into my existing workbook. Here is the syntax i have so far:
to note: I'm calling the workbook in which the macro is located testproject.xls, and I'm using [integer].xls as my list of files that the macro will query. Ultimately, this code will go in a loop.
Set currentCell = Worksheets("Sheet1").Range("A1")
varCellvalue = currentCell.value
Workbooks.Open "path_of_file" & varCellvalue & ".xls"
Windows("testproject.xls").Activate
currentCell.Offset.(0,1).Select
ActiveCell.FormulaR1C1 = "=[3.xls]Sheet1!R1C1"
The problem is, I want [3.xls] to carry the sale value as varCellvalue with .xls appended, and not be kept static at 3. I tried inserting & varCellvalue & ".xls" into the brackets, but with no luck. My only difficulty is getting [3.xls] to vary along with varCellvalue.
View 6 Replies
View Related
Nov 11, 2008
I am trying to set up a template for my MD to use to calculate budgets and have so far encountered a number of problems most of which i have overcome thanks to help from this forum.
What i am trying to do is have a 'Selection sheet' which contains a number of drop down boxes from which the user can choose several different options.
Based on what they have choosen on this sheet a second sheet 'initial budget' is populated.
What i am trying to do is a formula similar to the following. but i can't seem to get it to work.
View 15 Replies
View Related
Mar 21, 2013
I have got a master workbook and I have written macro to copy and paste data on another workbook. write a macro to save the new workbook to a file path with a file name where both file name and path are stored in master workbook sheet...
View 5 Replies
View Related
Nov 2, 2012
What is the best way to reference a cell in another workbook and return the cell contents and the comment on that cell. I would like the comment to come across as a comment in the new workbook becuase the comment is actually a picture.
Hope this makes sense. I did find a macro through googling but I couldn't get it to work? I don't really want to copy and paste because eventually I have hundreds of sheets & thousands of cells to refer to.?
View 2 Replies
View Related
Dec 3, 2006
what code can be used to be place in a Command Button on a worksheet that will use the value in a cell, change it to the directory where it have to be saved and save it to the value of another cell. Example:
On a worksheet called "Customer", at cel A1 will be the customer's name and at cell A2 will be the asset number. Now let's say a directory does not yet exist on the root for this customer, a new directory must be created in the root directory by using the name in A1, and the workbook must then be copied and saved under the value of A2.
View 6 Replies
View Related
Sep 21, 2007
Display Alert On Closing If Cell Not Filled In
How do I alter this code so that it acts like an INDIRECT function so will pick up a cell reference in another cell?
I can't just use A1 as I want this to change dynamically.
View 4 Replies
View Related
Jun 17, 2008
I have Quote Master.xls open
I have a value in AA1 that carries a number
I want to open Quote Log.xls
I want to find the cell in Column A (Quote Log.xls) that AA1 (Quote Master.xls) directly corresponds to
I want to offset from that found cell 3 cells to the right and insert from T7 (Quote Master.xls) into this offset cell. Here is the code so far
Private Sub InputIntoQuoteLog7_Click()
Dim CostSheetBook As Workbook
Dim QuoteLogBook As Workbook
Set CostSheetBook = Workbooks("Quote Master.xls")
Set RFQQNumber = CostSheetBook. Sheets("RFQ").Range("AA1")
Set RFQQStartDate = CostSheetBook.Sheets("RFQ").Range("T7")
Workbooks.Open ("\ACT3ENGVAULT EngineersLsheriffDocuments (2008)Quote System MashQuoteLog.xls")
Set QuoteLogBook = Workbooks("QuoteLog.xls")
Set vOurResult = .Find(What:=RFQQNumber, After:=[A1], _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 3)
vOurResult.Value = RFQQStartDate.Value
End Sub
I get an un-numbered error on the .Find
View 8 Replies
View Related
Aug 12, 2008
I am trying to complete these steps:
Take a value from AK59 from the "EQF" tab in a file called "QuoteMaster.xls"
Use that value to find match in column "A" in a Seperate workbook "ITMSTR.xls" on the "Sheet1" tab
Offset to the right 1 cell of the found value, take back to the "QuoteMaster.xls" and put in cell "AN59"
My code comes up with no errors, it opens the file and closes is as shown, but it doesn't copy the value over for whatever reason...
View 3 Replies
View Related
Dec 13, 2013
I am entering data into one workbook 1 (WB1) that contains a worksheet for every month. I manually extract some of the data from WB1 and put it into workbook 2 (WB2), which also contains a worksheet for every month. Is there a way to populate WB2 from WB1? For example, I want cell B5 from WB1 to automatically populate B5 in WB2, and so on. I have to update this every day and would like to way to automate it to cut down on data entry errors since they need to match. And both of these files are stored in SharePoint for others to access if need be.
I have attached a sample of the workbooks (yet only have one month in each of these wb).
View 2 Replies
View Related
Mar 31, 2012
The following code works great, however I want to change line 6 to reference a name of a file located in a cell on the activeworkbook. I was trying something like: set wbook = awb.sheet("Data").Range("A22") & ".xlsx" but its not working.
Code:
1 Dim wbook As Workbook
2 Dim awb As Workbook
3 Set awb = ActiveWorkbook
4 awb.Activate
5 On Error Resume Next
6 Set wbook = Workbooks("Accounts by Contract Rep.xlsx")
[Code]...
View 2 Replies
View Related
Jun 30, 2007
I'm trying to find a formula that returns the name of the workbook. I only seem to be able to return the whole filepath.
View 4 Replies
View Related
Jan 29, 2014
I want to be able to identify an Excel workbook in a cell, then have another cell pull the value from a specific cell in that workbook.
In the sample attached, I want the formula in cell C4 to pull the value in cell D35 from the workbook identified in cell C3. When I click within the brackets [C3] it asks me to choose a file name from my Explorer file list. "='[other_workbook.xlsx]Audit Information'!D35. I don't want to do that and want it to choose the file listed in cell C3.
View 5 Replies
View Related
Jan 16, 2013
is there a non VBA way to insert the workbook name in a cell?
View 1 Replies
View Related