I have a google sheet with multiple columns and rows and multiple contributors.
I need a script capable of keeping each first word capitalized in the entire sheet.
Example
Mike Jordan
and if it finds capitalized words "MIKE JORDAN" to correct it to "Mike Jordan" automatically.
You can use the proper() function.
=PROPER(A:A)
If you want to run the whole column try:
=ARRAYFORMULA(PROPER(A:A))
Related
I have programs to do this in Excel and I'm trying to find out if it's possible in Access.
Scenario: Pipe-delimited patient records of auto accidents are downloaded from hospitals, containing account numbers, lastname, etc., street address, hospital name.
Some accounts are "related", e.g., two people in the same accident. So surnames probably will be the same, street addresses will (almost) match, and account numbers will be close.
Addresses "almost" match means, e.g.:
Smith|John|123 Jones St|1234567
Smith|Mary|123 Jones Street|1234569
The full list might be 90 accounts, with maybe 3 sets of "relateds" (7 accounts total).
In Excel I sort by Street Address. Then it colors the cell background purple if everything before the space and the next two characters match. So it would color-flag these as "related". Then I sort by "Guarantor surname" (i.e., the person responsible to pay, not shown in the example), and color match surnames with a green background. Then I sort by "Patient surname" and color match those with a blue background.
It can't be done with filters--I need to see all the records each time because manual inspection is also necessary.
SO IN ACCESS, the records would be imported into a cursor, and then the cursor would be sorted by address--manually examined--then sorted by Guarantor Surname--and manually examined--then sorted by Patient Surname--and manually examined a third time.
I have already set up Access import code, but no "relateds" checks are done for those imports.
I'm looking for how I could color-flag individual fields in individual records--while they are being displayed in a cursor.
An alternative could be that after they are imported just dump the set into an Excel and modify the existing Excel code, but if it's not difficult I would prefer to do it all in Access.
Most of the Excel code is in subroutines that cycle through "Start at this row, and go until Cell R is empty". So if it's fairly easy to change an Access field+row entry background in a cursor, reworking the Excel code wouldn't be a big deal.
I'm pretty new to Access.
I have a logical doubt. Is it possible to return a value to a cell by performing Vlookup operation in 3 sheets, i.e the value to be returned might be in one of the three sheets. If so how can I approach this? I am trying to create a macro using VBA.
if there are no real differences between the worksheets you can use formulas instead of VBA using =IFERROR() and =VLOOKUP()
An example would be:
=IFERROR(VLOOKUP(valueToLookFor,sheet1Range,columnNumber,FALSE),IFERROR(VLOOKUP(valueToLookFor,sheet2Range,columnNumber,FALSE),VLOOKUP(valueToLookFor,sheet3Range,columnNumber,FALSE)))
This would just perform the search on the first sheet, if the value isn't there it will return an error, hence looking in the following sheet etc.
Bear in mind I've written the formula given your Excel is in English with commas (",") as separators, you might need to translate it in you default language and separators.
I have two columns in an Excel sheet containing Project names (Column A) and Fields (Column B) and I'm trying to add hyperlink for each row to local files. There's one specific local file for each row.
I don't know how to use Hyperlink function to get the corresponding URLs automatically because there are around 10,000 Project names. I also don't know if it is easier to use VBA.
The URLs are all identical except from "projects":
\nas1\backup\dop4\jobdata\projects\34s\34038 - 10 Wharaora Tce\Structural
The Project name in Column A is something like 34038, 25794 etc. and Filed in Column B is something like Structural, Civil etc.
So my plan is to write a VBA program that adds hyperlinks using URLs constructed from:
\nas1\backup\dop4\jobdata\projects
Because the Project name in column A is 5 digits, I'm thinking of using the LEFT function to get the first two digits to find the files after "Project file".
Folders
Excel file
A data sample will certainly help to understand what you are trying to achieve. Please update your question and then leave a comment to notify people who are watching this thread.
As far as I understand your question, you want to concatenate several cells into a string that can then be used to construct a hyperlink. Consider this screenshot
the formula in cell C2 is
="\nas1\backup\dop4\jobdata\projects\"&LEFT(TEXT(A2,"0"),2)&"s"
Copy down. In D2 you can use the Hyperlink() function to refer to the Address in C2, or wrap a hyperlink function around the formula in C2.
I have two sets of data that contains some of the same information. This data is Names, b-days and other information about people. Each person is contained in one row through multiple columns.
Any ideas of how to make a script through VB to check all information from one person in one set of data with all of the data in the other set? I need to Highlight any names that are not in both sets. e.g.
(If another way in excel is available that works too) Cannot download any other software
Set 1
Somebody, Bob 9/2/2012 Male
Someonelse, Joe 8/16/1950 Male
Set 2
Somebody, Bob 9/2/2012 Male
In this case I would need to highlight Someonelse, Joe in Set 1.
Acual data contains a few thousand people. Efficiency of script not a huge deal, as long as it gets the job done.
Do you have an example? I'm not very familiar with how Excel works. Thank you! – Scape 27 secs ago
If your intention is to find the values which are not in SET 2 then you can use the Countif formula in conjunction with an IF formula. See the snapshot.
And if you want to highlight the cell then use conditional formatting using a formula :)
So I have a document with many entries that follow this general format.
Organization Name Title Address Phone Fax
Description line 1
Description line 2
Organization's website.
Organization Name Title Address Phone Fax
Description line 1
Description line 2
Organization's website.
Organization Name Title Address Phone Fax
Description line 1
Description line 2
Organization's website.
What I want to do is to sort them by organization and treat the first rows as one entry so excel essentially thinks:
Organization Name Title Address Phone Fax
Description line 1
Description line 2
Organization's website.
is one row. I should also add that the bottom 3 rows are merged across the cells that form the row above them. Essentially I need it to work as a database but for government workers who are so technically unsavvy they can't upgrade to Office 2007 because the whole ribbon thing is "too confusing." So I am stuck using Excel 2002. I need to be able to sort them and use the top few rows above the actual chart to include a header and sub-heading.
Do you need the description/website rows to remain merged? If not unmerge to make it easier. You've tagged it as VBA but if this is a one-time fix then is it OK to manually work on the sheet?
As a starting point I would suggest adding an identifier to each group of rows, and depending on your data quality you could do this by checking the website cell, or simply by counting rows. For example, you could insert a new column before your data and put the following in cell A2:
=IF(Left(Lower(B1),4)="http",B2,A1)
Where B1 (the row above) could be Organization, Description 1, Description 2, Organization's website, and if it is a website, we assume that on this new row we're starting with a new block of data so we'll take the organization name. If it isn't a website, we'll use the organization name we were using previously (A1 will need to =B1). Then copy that formula down until the end and the 4 rows will at least now have a common key which you can then use to mash around the data.
If there are URLs which just start www. then modify the formula or better, just search/replace "www." to be "http://www." so that your data quality has improved.
Can't you just try recording a macro daoing whatver sort operation you want using UI, and then alanyze the code, and get an idea of what you need to do?