Thursday, January 16, 2020

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundred bad sectors all clustered up in last couple of gigabytes on the hard drive. If I leave that part out unformatted, will it work right?


edit: This is the situation after testing. There is visible chaos at the end. All Sentinel or HDD Regenerator tests and repairs freeze when processes reaches 99%. It found additional 1 bad sector in the middle and a weird darker green pattern at the upper part of the image :)


Chkdsk with /f or /r also freezes at 99%. Done full windows format. People say that it should remap the bad sectors, but I'm not sure it did here any good.I will just try to make a 100 GB partition for system, and see how it works.


disk surface map

Tuesday, January 14, 2020

worksheet function - Multiple date formats in single column in excel


I have a csv file with a date column with dates in various forms as follows:


dd-mm-yyyy


yyyy-mm-dd


yyyy-mm


yyyy


This irregular data is in a single columns.


How do I convert all of them to the dd-mm-yyyy and extract the year from them using excel formula? The desired output is as follows:


Input       Output
25-03-1954 25-03-1954
22-09-1987 22-09-1987
1990-01-25 25-01-1990
1968-11-15 15-11-1968
1919-01 01-01-1919
1873-02 01-02-1873
1945 01-01-1945
1933 01-01-1933

Answer



If all that you really need is the Year, then use @robinCTS formula.


IF you want the result to be "real Excel Dates" and



  • if your data is TEXT and not real dates,

  • and if your regional date settings are DMY,

  • and the column is formatted as dd-mm-yyyy


then you could use this formula:


=IFERROR(IFERROR(IFERROR(DATEVALUE(A2),DATEVALUE(A2&"-01")),DATEVALUE(A2&"-01-01")),"illegal date format")

Note that dates prior to 1900 cannot be real dates in Excel, but could be represented as TEXT strings. I will leave it to you to tweak the formula.


If your output needs to be internationally aware to countries that have other date formats, then a VBA solution might be best. If that is not possible, helper columns to split the data and then reassemble appropriately, or a very complex formula to do the same, could be used.


Note that this UDF will output either the actual date, or just the year, depending on the second optional argument.


Option Explicit
Function ConvertToDate(S As String, Optional Yr As Boolean = False) As Variant
Dim V
Dim dtTemp As Date
V = Split(S, "-")
Select Case UBound(V)
Case 0
dtTemp = DateSerial(V(0), 1, 1)
Case 1
dtTemp = DateSerial(V(0), V(1), 1)
Case 2
If Len(V(0)) = 4 Then
dtTemp = CDate(S)
Else
dtTemp = DateSerial(V(2), V(1), V(0))
End If
End Select
If Yr = True Then
ConvertToDate = Year(dtTemp)
Else
If Year(dtTemp) < 1900 Then
ConvertToDate = Format(dtTemp, "dd-mm-yyyy")
Else
ConvertToDate = dtTemp
End If
End If
End Function

Both methods look at the first segment, and assume it is a year if LEN > 4, and then look at how many segments to decide whether to append the necessary -01's


The VBA solution will output dates prior to 1900 as a text string.


hard drive - BitLocker in Windows 7 Ultimate decryption of external HDD

I have locked my external hard disc using BitLocker. After formatting my computer I have lost all keys to open my external hard disc. Is there any way to unlock the external drive.

Display on TV using HDMI on laptop and TV

What settings on laptop are needed to get connection from Acer Travelmate 5730G hdmi port to hdmi tv to work. PC monitor works well with the laptop, but no luck with HDMI

microsoft excel 2007 - How to combine values from multiple rows into a single row

I have an Excel 2007 spreadsheet with 2250 rows and 19 columns. In these rows, I may have two rows of duplicate customer information that need to be combined, but only if the cell above is empty. I may also have rows of customer data that are not in need of combining. A unique customer member number can be used to identify the rows that need to be combined together. I'm struggling on developing the right VBA script to combine the unique customer data into the one row (on top) and delete the row that is remaining after combining. Is anyone willing to assist? It will save me hours/days of hand combining these rows and we are in the middle of a time sensitive audit.


Sample of our data:



MEMBER FIRST NAME MEMBER LAST NAME MEMBER # MVP SYSTEM ENTRY DATE ENROLL DATE MVP POINTS DRAWING ENTRIES ENROLL FORM? POINTS CORRECT? POINTS MISSED FINAL POINTS DRAWING ENTRIES SP Talon # WP Talon # BD DEPT EMPLOYEE NOTES DLR
Gene S 550061 3/2/2013 0 0 0 #N/A
Gene S 550061 3/2/2013 1539 137 MC MJ SP
Steve G 550087 3/2/2013 30019 1588 PA NR WP
Curtis S 550128 4/24/2013 5 0 5 #N/A
Curt S 550128 4/24/2013 358 47 MC MJ SP

Edit (not from OP) to add pipe/paragraph delimited version with underlines for spaces in headings:


MEMBER_FIRST_NAME|MEMBER_LAST_NAME|MEMBER_#|MVP_SYSTEM_ENTRY_DATE|ENROLL_DATE|MVP_POINTS|DRAWING_ENTRIES|ENROLL_FORM?|POINTS_CORRECT?|POINTS_MISSED|FINAL_POINTS|DRAWING_ENTRIES|SP_Talon_#|WP_Talon_#|BD|DEPT|EMPLOYEE|NOTES|DLR
Gene|S|550061|03/02/2013||0|0||||0|#N/A|||||||
Gene|S|550061||03/02/2013||||||||1539|137||MC|MJ||SP
Steve|G|550087||03/02/2013||||||||30019|1588||PA|NR||WP
Curtis|S|550128|4/24/2013||5|0||||5|#N/A|||||||
Curt|S|550128||4/24/2013||||||||358|47||MC|MJ||SP

windows 10 - I get the error: "Reboot and Select proper Boot device"



After I got a new and bigger SSD, I wanted to install Windows 10 on it. For some reason BIOS did not list my bootable USB device, with the Windows 10 installation. So I connected it thorugh SATA instead, and now it would let me install Windows 10. Problem is, everytime I disconnect the HDD where the Windows 10 installation is located, I get the error: "Reboot and Select proper Boot device" during boot. When I connect the HDD, it seems to boot from the installation HDD, and let me choose to open into Windows 10 (on the SSD). I can then use Windows 10 normally.



Som other info:



When the installation HDD is disconnected and I go into BIOS, the SSD is the only thing listed under boot devices. If I choose the SSD manually from BIOS, I get the same error message.



At first under the Windows 10 installation, I coulnd't install on the SSD because of it being a GPT-partition. I used Diskpart and then installed Windows 10.




I have tried to set the SSD as "active" with Diskpart.



BIOS Mode



MSInfo32 shows: Legacy



Title shown in BIOS menu: UEFI BIOS Utility - EZ Mode



BIOS when old and new SSD is connected. The old SSD (with working Windows 10) has the UEFI label.



Answer



So I found a USB drive that worked. I'm not sure what went wrong, when trying to connect. Now I got a fully functional Windows 10.


Monday, January 13, 2020

Our WSUS accidentally had Windows Insider updates turned on. How can I remove the 1909 update from my Windows Update screen without installing it?



There was a misconfiguration in my company WSUS and Windows Insider updates were accidentally included (our sysadmin checked the box for all Windows components and apparently Windows Insider was a part of that). I'm the only user with a Windows 10 machine (small shop of half a dozen people), and as such, my Windows Update recommends I install the 1909 feature update. Note that this machine is not enrolled in Windows Insider, has never been enrolled in Windows Insider and is not planned to ever be enrolled in Windows Insider. I'm not the sysadmin. Note that we use our WSUS only as a database of available updates, not to also distribute the updates themselves. We download the Windows updates themselves from the official Microsoft servers.



Our sysadmin has unchecked the Windows Insider box, but I still got that "Evaluation version of Windows Insider component update to version 1909 x64" update in my Windows update list. I've tried hiding the update through that one troubleshooting thing you can download, I've tried restarting the Windows Update service and I've tried deleting my SoftwareDistribution folder, but I can't figure out how to make this update go away. I've clicked the option to pause the updates for 7 days, but I don't know what else to do. I really don't want to accidentally install this update and then end up with an evaluation edition of Windows 10 1909 meant for betatesters.


Answer



I mentioned in my question that I paused updates for 7 days. I just resumed the looking for updates, and it checked for updates again and didn't find the Windows Insider update again (this was after our Sysadmin disabled the Windows insider box).



So I managed to solve my problem (how to remove the 1909 update from Windows 10 Windows Update settings screen without installing it) by first pausing Windows Updates for 7 days and then resuming the Windows updates immediately afterwards. This triggers a new search for Windows updates and indeed uses the new WSUS configuration for updates. Because at this point the Windows Insider updates were turned off, it didn't recommend it again during this check.


hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...