Need to modify data from DB

Ferrora

New Member
Joined
Oct 1, 2018
Messages
3
Hello,

I have slight problem with my code. I have code that extracts data from DB and put it in table. Example:




So I need that cells on L column are lighted (red for example) if the data is repeating itself for 3 shifts. Or at least i need a way i could see when data is repeating.
The idea is that i extract data that is out of specific range.


Code:
sql = "SELECT ID, (SELECT Number FROM WindingStands WHERE ID = TexMeasurements.WindingStandID) as Place, SpindleNumber, " _
& "(SELECT Number FROM Assortments WHERE ID = TexMeasurements.AssortmentID) as Sifrs, " _
& "(SELECT Name FROM Assortments WHERE ID = TexMeasurements.AssortmentID) as Sort, CreationTime, TexPV, TexSP " _
& " FROM TexMeasurements " _
& " WHERE CreationTime > " & fromdate & " AND CreationTime <= " & ToDate & " " _
& " AND (TexLimit <= -3 OR TexLimit >= 3) ORDER BY Place, SpindleNumber, CreationTime"


I hope somebody could help me with this.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,214,830
Messages
6,121,831
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top