How To Subtract $10 from every Row Quickly for Data Cleaning
Learn how to quickly subtract $10 from every row in Google Sheets while handling text and numbers effectively, ensuring smooth data cleaning without errors.
Data cleaning is a very important job in Google Sheets and any spreadsheet software. And what happens is there's sometimes when we just want to execute a little simple function like subtract 10 from every single row, and we might have some issue like there's this header row . It says price. And if we do equals this minus 10, we're going to get some error . We are going to be able to get this number here. And maybe there's some more text here. Uh, but also beyond that text, there is numbers. We just want to subtract 10 anytime that there is a number . So I'm going to show you a really quick way to do that. I'm going to do equals this minus 10, just to show you that that gets the answer we want. This new price minus 10. Most Common Errors and How To Handle Them in Google Sheets Learn to Code in Google Sheets, For Programmers | For Advanced Google Sheet Users Learn to Code in Google Sheets, For Programmers How To Subtract in Google Sheets
And if we copy paste it down, we will see we get a value error . So let's not get the value error , let's just get text here. So how do we do that? We're gonna do equals, if, and we're gonna give it some logical expression , and we're gonna say is number . And the value is gonna be this reference B24. Now, if the value is true and it is a number , We want to take that reference , so B24, and minus 10. But if it's not, if it's false, if this text here is not a number , what do we want? We want just the text, alone. Okay, so now we have this, and we copy paste it up here, and we can see now, all of the references have been changed to B2. This is perfect. So let's delete everything, and just take this, Version of it and copy paste it all the way down. How to Refer to Other Cells - A1 and R1C1 Explained How to Bring value from other cells | How to Reference an array in a cell Count First Digit of Cell
And now we see we have a new set of values that what we can do is we can copy command C and we can , shift command V, which is paste values . And now we just delete that column we used for data cleaning. And now we have the new prices of course. If you do want to keep the old prices, we can just label this new price. And if we do not want this formula here, but we just want, let's say, the new price, we can copy this entire column and shift command V, copy paste values , and again, we have the price and a new price, which is everything is subtracted by 10, except when there is some text, we have the text as it is. Basic Keyboard Shortcuts To Speed Up Your Productivity Easiest Mistakes to Make In Spreadsheets Remove Non Numbers
Thanks. So that makes it super easy to do some really quick data cleaning or updating or augmenting of your numbers, your values , you can subtract 10, you can multiply, do anything you want to it. If you're looking for more interesting stuff to do with Google sheets, make sure you subscribe here on YouTube to better sheets. Bye. Pricing Strategies for Spreadsheets Absolute Basics of Google Sheets Advanced Coding in Google Sheets for Programmers How To Sum A Column In Google Sheets