Comments on: A Guide to Google Sheets Strikethrough Formatting [3 Ways] https://spreadsheetpoint.com/strikethrough-google-sheets/ Google Sheets Tips & Tutorials Fri, 02 Feb 2024 13:11:56 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: jmarkus https://spreadsheetpoint.com/strikethrough-google-sheets/#comment-13496 Fri, 02 Feb 2024 13:11:56 +0000 https://spreadsheetpoint.com/?p=2133#comment-13496 In reply to nobody.

That’s not a built-in feature, but I know a workaround. If you’re comfortable with App Script, you can detect strike through in google sheets with the following code:

function onEdit(e) {
var sheet = e.source.getSheetByName('YourSheetName'); // Replace with your sheet name
var range = e.range;
var value = range.getValue();

// Check if the cell has strike-through formatting
var isStrikethrough = range.getFontLines() === 'line-through';

if (isStrikethrough) {
// If strike-through, add a sorting key (e.g., sort to the bottom)
sheet.getRange(range.getRow(), range.getColumn() + 1).setValue(value);
}
}

function sortOnStrikethrough() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.sort(sheet.getRange(1, 1, sheet.getLastRow(), sheet.getLastColumn() + 1));
}

]]>
By: Chris Daniel https://spreadsheetpoint.com/strikethrough-google-sheets/#comment-11673 Fri, 23 Jun 2023 02:41:06 +0000 https://spreadsheetpoint.com/?p=2133#comment-11673 In reply to Frances.

You can’t currently do that. However, you can apply both strikethrough and conditional formatting at once to data points that meet other criteria.

]]>
By: Frances https://spreadsheetpoint.com/strikethrough-google-sheets/#comment-10863 Thu, 12 Jan 2023 14:43:29 +0000 https://spreadsheetpoint.com/?p=2133#comment-10863 How to conditional format a cell so that when it’s strikethrough it colors in that cell?

]]>
By: nobody https://spreadsheetpoint.com/strikethrough-google-sheets/#comment-4752 Thu, 06 May 2021 12:32:13 +0000 https://spreadsheetpoint.com/?p=2133#comment-4752 How to detect strike through, sort by strike throughness etc?

]]>