Excel, how to use macros and conditioning.

Matt - Aug 13, 2015 at 09:43 AM
 Matt - Aug 13, 2015 at 04:25 PM
I have been looking up how to use excel to help sort data but ran into a few problems. First I have searched how to delete a row with certain conditions and found a code or macro with conditions to do so. But I have no idea how to use it. Second, I am looking for help to have an automated way of searching and reading multiple data points in one cell, but analyzing it sepratly. One cell could contain "jack: 3,tod: 5,justin: 3". I am wondering if there is a way to say if Justin is in the cell record in this cell the number that comes after his name. If you could help that would be wonderful!

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Aug 13, 2015 at 11:09 AM
Hi Matt,

Different codes needs to be put in different locations but this is the most common one:
How to implement and run a code:

- From Excel hit Alt + F11 to open the "Microsoft Visual Basic" window.
- Go to the top menu in the newly opened window > Insert > Module.
- Paste the code in the big white field.
- You can now close this window.
- Back at Excel, hit Alt + F8 to display the available macro's.
- Double-click the macro you wish to run.
NOTE: macro's cannot be reversed using the blue arrows. Always make sure you save your file before running a code, so you can reopen your file if something unforeseen happens or you want to go back to the situation before the code was run.

As for your second question, you can try to use the text delimiter (or Text to Columns) found under the Data ribbon.

Try it and let us know if you get stuck.

Best regards,
Thank you!!!