preserving hyperlink from cell when doing REGEXREPLACE in google sheets - google-sheets

In Google Sheets, doing =REGEXREPLACE(B10,".*\. ","") correctly turns "1. a" to "a" but the hyperlink from B10 cell is gone, is there a way to preserve this link automatically, or any way to transfer the link to the new cell automatically?

It seems that you have used Insert Hyperlink menu to insert the hyperlink in B10, copied B10 to C10 (preserved the hyperlink), then replaced C10 with =REGEXREPLACE(B10,".*\. ",""), which removed the hyperlink.
You could try using HYPERLINK function to explicitly define hyperlinks, like this:
B10: =HYPERLINK("https://google.com","1. a")
C10: =HYPERLINK("https://google.com",REGEXREPLACE(B10,".*\. ",""))

Related

Google Spreadsheets - highlight if same cell is exist

I have spreadsheet with two tabs (House1, House2).
Example: https://docs.google.com/spreadsheets/d/1ZaYgBEfqe9S9Qc526HjkhquJMDQKitvv8khjQIyZfMA/edit#gid=0
In House2 tab I have some names database.
In House1 tab I write new names.
Question:
How set highlight if new name in House1 tab will same like some name in tab House2?
Set up conditional formatting on the range A:A in Sheet1. Use as a custom formula
=countif(indirect("House2!A:A"), $A2)>0
and see if that works?
Check out the spreadsheet you shared and check out the conditional formatting applied to column A in sheet 1.

To identify same words in two tabs in a google sheet

My Query is i want to highlight the duplicates in the two tabs in a sheet. My sheet is attached along with this question. In that "Sheet A" & "Sheet B" have common names in it i want to color it for the duplicates.
Sheet : https://docs.google.com/spreadsheets/d/1hL64Q7REorVkjJNKAEGPFBdinlIn8VwnE6H7L9fYB2c/edit#gid=0
If it is possible, is there any option to find the duplicates between two google sheets ?
if yes then pls help me to find duplicates in Sheet A in Match 1 sheet and Sheet C in Match 2 Sheet.
Sheet 2 : https://docs.google.com/spreadsheets/d/1xAUmvmaZPvfJwCHD_esrshLccgKM3VmP1CI46mMoRB8/edit#gid=0
I have an answer that shows how this can be done. See the tab I added, "Sheet 1-GK", into your sheet.
The formula in C1 looks at the data from Sheet 2 to see whether each name in Sheet 1 column A is found in Sheet 2.
Here is the primary formula:
=ARRAYFORMULA(IFERROR(
IF(MATCH(A2:A9,IMPORTRANGE("https://docs.google.com/spreadsheets/d/1xAUmvmaZPvfJwCHD_esrshLccgKM3VmP1CI46mMoRB8/edit","'SHEET C'!A$2:A$8"),0),
"Y",
"N"),
"N"))
In the sheet, I have wrapped it in an array, {...}, to also add the column header text.
Then a conditional formatting rule is used to highlight the rows that have "Y" in column C.
Note that you can either hide column C, or incorporate its formula logic into the conditional formating rule, to do everything there.
Is this what you were looking for, or did you need something else?

how can I format a cell in google spreadsheets

I have a spreadsheet that have a column containing github issue numbers, how can I make all the fields in that column a url to the issue on github.
lets say https://github.com/myaccount/myrepo/issues/ is where the issues exist, I want to make all those fields link to "https://github.com/myaccount/myrepo/issues/{existing-issue-nb-here}"
e.g: in line 54, column B(github issue #) should be a hyperlink to https://github.com/myaccount/myrepo/issues/652
If you never overwrite the first row of the column with the links you can use the HYPERLINK formula inside of an array formula
={"github issue #";
ARRAYFORMULA(IF(LEN(B2:B),
HYPERLINK("https://github.com/myacco‌​unt/myrepo/i‌​ssues/" & B2:B,
B2:B), ""))}
If you are importing / copy pasting Column B and want to replace it with a link you need to do that with a script that, for every cell does
setFormula("=HYPERLINK(CONCATENATE(https://github.com/myacco‌​unt/myrepo/i‌​ssues/ ,bugId), bugId)")
Where bug ID is either read from the row in column B or in the data you retrieved via script.

Index row formula error on Google spreadsheet

I have a formula in Google spreadsheet from cell B2 all teh way to B100 which is
B2=iferror(INDEX(DB!$B:$AC,SMALL(IF(DB!$B:$AC=$A$1,ROW(DB!$B:$AC)),ROW(1:1)),0), "")
B3=iferror(INDEX(DB!$B:$AC,SMALL(IF(DB!$B:$AC=$A$1,ROW(DB!$B:$AC)),ROW(2:2)),0), "")
B4=iferror(INDEX(DB!$B:$AC,SMALL(IF(DB!$B:$AC=$A$1,ROW(DB!$B:$AC)),ROW(3:3)),0), "")
B5=iferror(INDEX(DB!$B:$AC,SMALL(IF(DB!$B:$AC=$A$1,ROW(DB!$B:$AC)),ROW(4:4)),0), "")
..
...
......
So it is pulling up values from a second tab which is named as "DB".
The Index row formula looks for the status "Completed" ( which is on cell A1) and return the details for all completed from the DB.
Google spreadsheet
main spreadsheet
Database in tab 2 (DB)
DB
The formula works fine , however i am getting duplicates of every cell which got the status "Completed "
Attached links to the screen shots for your reference.
Don't know what i am missing. 0_o
Thanks
I think you can use QUERY() for what you try to achieve.
Have a look at this example sheet and check sheet 2 where this formula is used to filter the data from sheet 1:
=query(Sheet1!A:H, "select * where B = '"&A1&"' ")
(where A1 is a drop down list with the values 'COMPLETED', 'in progress', 'resolving').
See if that helps ?
there is no need for formula here.
This is simply done by filtering:
Supposing you have a DB sheet like this
In your main sheet, put DB!A1 in cell A1, and drag and fill horizontally and vertically, to copy exactly your DB sheet into main sheet (you can do this selectively as well, there is no need to copy every column, just cpy those you want). Then click on FILTER, you can find it in SORT AND FILTER, then you will see a dropdown menu on all of the column headers. Simply by clicking on your status header, you can selected completed and press OK, it will ONLY show rows with completed on their status column.
And here is the link to download this example sheet
your links don't work for me.
You should use the FILTER() function, that is designed exactly for this purpose:
in cell A2 on your second sheet use: =filter('DB'!B:AC,'DB'!B:B=$A$1)
As suggested I would use Data validation with dropdown list, so that only valid statuses may be chosen.

Calculated in-document hyperlink

I would like to create a calculated hyperlink that will target a cell within the same document. Insert > Hyperlink allows this option and uses the string #Sheet1!A1, for the Cell A1 on Sheet1, for example.
Is there a way to express this feature as a formula such that it can create the hyperlink based on the result of a calculation?
Yes, there's the HYPERLINK() function:
=HYPERLINK(CONCATENATE("#Sheet1!",T(E2)),"Test")
NB: when working with other language settings then "English (USA)", OOo might require other argument separators (for example: with "German (Germany)", semicolons instead of commas are required).
Split on multiple lines for readability:
=HYPERLINK(
CONCATENATE(
"#Sheet1!",
T(E2)
),
"Test"
)
It will insert a hyperlink, with the target depending on the content of the cell E2. Using the T() function, the Sheet could be set dynamically, too. In my example, E2 could have the value of "A1", resulting in a hyperlink pointing to #Sheet1!A1.
EDIT: Here's a screenshot of a hyperlink with target sheet, target cell and hyperlink text set dynamically:
using this formula:
=HYPERLINK(CONCATENATE("#",T(D1),"!",T(D2)),T(D3))

Resources