![excel query table cell value excel query table cell value](https://i.ytimg.com/vi/MCkLi49cc8Y/maxresdefault.jpg)
![excel query table cell value excel query table cell value](https://www.mrexcel.com/img/content/2020/02/Chal-05-1.png)
SConnString = "Provider=SQLOLEDB Data Source=*.*.*.* " & _ Newrow3 = Left(newrow3, Len(newrow3) - 1) Newrow2 = Left(newrow2, Len(newrow2) - 1) Newrow = newrow & "'" & Left(Trim(Worksheets("Sheet1").Cells(i, "A").Value), 7) & "',"įor j = 1 To Worksheets("Sheet1").Cells(Worksheets("Sheet1").Rows.Count, "F").End(xlUp).Row 'MODIFIED: create the search string for the IN-Statementįor i = 1 To Worksheets("Sheet1").Cells(Worksheets("Sheet1").Rows.Count, "A").End(xlUp).Row
#EXCEL QUERY TABLE CELL VALUE FULL#
Here is my full code for macro: Sub GetSQLData() s on s.ShipJobNum = j.num2ĪND convert(varchar(10),S.) IN " & newrow2 & "ĪND s. The reason beingīelow left join condition in my query where s. I need to check each column instead of using IN statement.
![excel query table cell value excel query table cell value](https://www.spreadsheetweb.com/wp-content/uploads/2018/09/How-to-remove-blank-rows-by-Power-Query.png)
The problem with this macro is IN statement. However, I created below macro which displays incorrect data.