In Worksheet query results, why are some values highlighted blue? - snowflake-cloud-data-platform

When I run a query, some results are returned in blue, while others in regular black font. Why?

if the text/string is just text it mean it has newline/carriage returns in the data, or the other reason is it's of type variant, but then all of that column would be blue.. which implies the former.

I typically see this when the field is very long (difficult to display from just extending the column length) and clicking the link allows me to see the entirety of the data in an easy pop-up. Does this seem to fit the trend of what you are seeing?

Related

Google Sheets: Sum, Query, other Formulas Treating Values (Formatted as NUMBERS) as Zeroes in Formulas - Unclear why

I have 15 Google Workbooks that import into 1 Workbook tab through an Importrange + Query combo function. The data is then queried and transformed across several other tabs, but the problem definitely begins on this tab.
Although I've manually forced a format change to "Number" in each workbook source AND in Columns CO:CQ (where the problematic data lands), all functions see the data as zero or null. Here is what happens when I set a random cell (CW33) equal to a cell in one of the trouble columns (CO33)
However, when I wrap the cell in an =sum(), the workbook returns "0":
I have no idea how to force the workbook to see the values in these rows as numbers without creating an entirely new column - does anyone have any ideas on how to fix it while preserving the column structure?
Thanks!
try:
=SUM(CO33*1)
for multiple cells it would be:
=ARRAYFORMULA(SUM(CO33:CO34*1))
or:
=SUMPRODUCT(CO33:CO34)
AFAIK, in Sheets, a Number formatted cell displays contents right-aligned and Plain-Text are left-aligned. The highlighted cell looks like a text cell.
Try changing the format of cell or column manually to 'Number' from the 'Format' tab.

Array formula across columns and for entire column?

I'm a google sheets beginner and need some help. I am using a sheet that is populated by a google form, so it's a bit tricky for me.
The google form allows users to select up to three options - red, blue, green. They must select one and can select three, so the output in column A can be "red" or "red, blue" or "red, blue, green" or any combination.
I've figured out how to split the answer combination using the formula =ARRAYFORMULA(trim(SPLIT(A2, ","))) so I get the individual outputs without the commas (that the google form returns) across up to three columns.
But - since it's a google form, I also need to have this formula automatically pasted as new rows are added to the sheet from the form. I can't figure out how to do a "double" array formula (for additional columns for data output and additional rows as data input) or if that's even an option or if I'm missing something here. Any help? thank you!
use in row 1:
={"formula", "header", "row"; ARRAYFORMULA(TRIM(IFERROR(SPLIT(A2:A, ","))))}
or in row 2:
=ARRAYFORMULA(TRIM(IFERROR(SPLIT(A2:A, ","))))
fully dynamic formula for row 1 would be:
=ARRAYFORMULA({"fx", IFERROR(REGEXMATCH(TRANSPOSE(ROW(
INDIRECT("A2:A"&COLUMNS(SPLIT(A2:A, ","))))))); IFERROR(SPLIT(A2:A, ","))})

Copy data from SQL Server to Excel "NULL" instead of blank NUMBERS

I copy data from a SQL Server result set and paste it into an Excel spreadsheet. The NULL values need to appear as blanks in Excel, but the default behavior is to show the word, "NULL". For text fields, I can apply ISNULL([field],'') in the original query. But what about numeric fields? I don't want it to be 0, it needs to be blank. Is there a query based solution? I keep forgetting to do find and replace.
This is more of a comment but do to low rep, i'll post as an answer. Excel will not show a blank by default for a number value when pasted into the worksheet. It will interpret (correctly) a blank data point as 0. Since you are willing to find and replace 0s with null values, it seems this is for presentation purposes. If that is the case, I'd suggest conditional formatting. Set when the cell's value = 0 make the text white. if you are applying any mathematics to this column, the effect of a null cell or a 0 cell are the same, thus no impact to formulas/functions.

Generate hyperlink from query

My query is not returning the literal cell value, but rather only the visual portion of it.
I've got a google spreadsheet with FirstSheet having my info and then with the use of a query on SecondSheet showing part of the information.
The first column of FirstSheet has a hyperlink for each row in column A such as:
=hyperlink("http://www.google.com/test","My Test")
SecondSheet has a query that pulls that column amongst others such as:
=query('FirstSheet'!A2:C;"select*",0)
The query result only returns the label of the hyperlink but not the link itself or the hyperlink formula. Meaning I see the same text on both sheets but on SecondSheet it's not a link. I hope this makes sense.
I've thought about different ways to accomplish this including some how creating a string from a query to give me what I want, but I'm not sure. Any help would be greatly appreciated.
I solved it by moving the query to B2, selected column A last, putting it into Col C, hid C. I'm then using C with a formula I created in col A and then just pasted that formula down to row 100.
=If (C2="","",hyperlink("http://www.google.com/"&C2,C2))
I would have liked this to be more elegant, but it's good enough for now.

VB.Net - Excel application get showing values of an range

I'm trying get an Excel Range and copy into an array of objects with Vb.Net.
This is not a problem. I use the following code:
Dim vValues(,) As Object = ExcelApp.Range(vRange).Value
And works fine; but I have a the following case:
In the column "C"; the value has a specific format and internally has another value.
My question is:
Somebody know the way to get the information exact as the user see?
I'm trying to get the information without use a For ... Each or some kind of cycle.
I'm also tried to avoid use "text to columns" function.
Both seems right solutions, but would impact the performance with a lot of data.
FYI: Also I can get the information through the ODBC connection; but I'm searching the solution using a Range
Exactly what the user sees is the Text property. But you cannot have an array of that, you will have to query each cell individually.
You are getting a Double value in your array instead of a DateTime value because you have "Time" formatting applied in Excel. If you had a format from the "Date" category, Excel would instead send a proper Variant/Date, not a Double that represents it.
Another option would be constructing the DateTime objects on the .NET side, provided you know in which columns they should be.

Resources