Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! How Can I Separate The Month From the Year in a Date String Like 122007?

Hey, Scripting Guy! I have a column of data in Microsoft Excel that is formatted as MYYYY (12008 = January 2008) and MMYYYY (122007 = December 2007). I need to split these values into month and year, but I can’t figure out how to do that. Any suggestions?-- DW Hey, DW. Well, it’s finally beginning to warm up here in Scripting Land, ...

Hey, Scripting Guy! How Can I Sort a Spreadsheet By Cell Color?

Hey, Scripting Guy! We have an Excel spreadsheet in which we use different colors as a way to track status information. That works out really good for us, except for one thing: sometimes we’d like to sort the spreadsheet by color. As near as I can tell, however, Excel doesn’t let you sort a worksheet by color. Could a script help me out ...

Hey, Scripting Guy! How Can I Check the Value of a Specific Cell in a Bunch of Office Excel Spreadsheets?

Hey, Scripting Guy! How can I create a script that will list all the files in a directory that have a specific value in a specific cell of an Office Excel workbook? And can that be expanded into a find/replace function?-- RDC Hey, RDC. Now that we’re finally beginning to get a bunch of scores posted for the 2008 Winter Scripting Games ...

Hey, Scripting Guy! How Can I Mark the First Occurrence of a Number in an Office Excel Spreadsheet?

Hey, Scripting Guy! I’m trying to determine – and mark – the first occurrence of a number in an Office Excel worksheet. However, I can’t figure out how to go about doing this. Can you help?-- BH Hey, BH. Before we launch into today’s column we have an announcement to make: the Scripting Guys surrender. You have ...

Hey, Scripting Guy! How Can I Read Custom Summary Information Properties for an Office Excel File?

Hey, Scripting Guy! We’ve added a number of custom properties to the summary information pages of our Office Excel files. How can I access those custom properties using a script?-- UR Hey, UR. You know, the Scripting Guy who writes this column almost didn’t write this column today. That’s because he’s seriously thinking about making...