Posts

Split columns by Power Query

Image
  Split columns by delimiter In Power Query, you can split a column through different methods. In this case, the column(s) selected can be split by a delimiter. Where to find Split Columns > By Delimiter You can find the  Split Columns: By Delimiter  option in three places: Home tab —under the  Split column  dropdown menu inside the  Transform  group. Transform tab —under the  Split column  dropdown menu inside the  Text column  group. Right-click a column —inside the  Split column  option. Split columns by delimiter into columns In this example, the initial table will be the one shown in the image below, with only one column for  Accounts . This column holds two values: Account number Account name In this example, you want to split this column into two columns. The values are delimited by a space—the first space from left to right. To do this split, select the column, and then select the option to split the column by a delimiter. In  Split Column by Delimiter , apply the following

How to Record Macro

Image
  How to Record Macro in Excel It is important to know that you when you record a macro, the Macro Recorder captures almost every move you make. So if you make a mistake in your sequence, for example, clicking a button that you did not intend to click, the Macro Recorder will record it. The resolution is to re-record the entire sequence, or modify the VBA code itself. This is why whenever you record something, it's best to record a process with which you're highly familiar. The more smoothly you record a sequence, the more efficiently the macro will run when you play it back. Macros and VBA tools can be found on the  Developer  tab, which is hidden by default, so the first step is to enable it. For more information, see  Show the Developer tab . Record a macro There are a few helpful things you should know about macros: When you record a macro for performing a set of tasks in a range in Excel, the macro will only run on the cells within the range. So if you added an extra row t

Create Index in Excel Sheet

Image
How to Create Index in Excel sheet by using VBA Code Open a New Excel sheet Click on Main tab ( Click on blank area) Click on Customize ribbon. After opening customize ribbon. Click on Add-ins tab Click on Manage [Excel Add-in)  Go Tab Browse File ( Create Index file) Click on ok button. Click on File and click on option  Click on Customize ribbon Click on Macro Click on Main Tab Select Home Tab Click on New Group Do Rename of New Group Select VBA Code ( Ex. Create Index.Xlam..) Select created New Group Click on Add button Click on New Tab Do rename of New Tab Select any Icon Click on OK After completion of above process, a new icon will be created under home tab Click on new icon ( Create Index) Index sheet will be created. Thank you

How to Export Excel file to PDF and Save in Folder by using VBA Button

Image
 How to Export Excel file to PDF and Save in Folder by using VBA Button  Open a new excel file Click on developer tab Click on visual basic tab Click on Insert tab Click on Module tab Paste VBA Code Replace Folder path  Save this file in Excel Macro enabled work book format. OR Save it in Excel Add-ins format. Paste that saved file in below folder path (in C drive) Do right Click on any free white space. A new option list will be Opened Click on Customize ribbon.  Select Macro Select Main Tab Select Home Tab Click on New Group Do Rename created New Group Select New Group Select VBA Code ( Ex. SaveActiveSheetAsPDF...) Click on Add button. Click on New TAB under new group Do Rename of New Tab. Select any Icon for new Tab and click on ok A New Button with VBA code will be created under home tab in all excel sheet. Select print range by using page set-up under page Layout tab. Click on button & file will be exported in folder.     Exported PDF file will be placed in folder. Sample file

How to save mail Attachment in a Folder by using VBA button

Image
How to save mail Attachment in a Folder by using VBA button  If you want to save the active email's attachments while it is open, you can use the following VBA code: Please replace " C:\Your\Defined\Folder\Path \" with the path where you want to save the attachments. You can run this code from the Developer tab in Outlook after you've created a new module in the VBA editor and pasted the code into it. This code is designed to work on the currently active email and save its attachments to the specified folder. Select any incoming mail Click on Developer Tab Click on Visual Basic tab. Create a New Folder. Copy folder path Click on Insert Tab Click on Module Tab Paste VBA Code (  Download VBA Code  ) After Paste VBA Code replace folder path  Click on close and return to microsoft outlook. Click on File tab Click on Customize Ribbon tab Select Macro Select Main Tab Select Massage tab Click on New Group Do rename of New Group  Select New Group again Select VBA Code (Ex. Pr

IF function

Image
  IF function The IF function is one of the most popular functions in Excel, and it allows you to make logical comparisons between a value and what you expect. So an IF statement can have two results. The first result is if your comparison is True, the second if your comparison is False. For example, =IF(C2=”Yes”,1,2) says IF(C2 = Yes, then return a 1, otherwise return a 2). Simple IF examples =IF(C2=”Yes”,1,2) In the above example, cell D2 says:  IF(C2 = Yes, then return a 1, otherwise return a 2) =IF(C2=1,”Yes”,”No”) In this example, the formula in cell D2 says:  IF(C2 = 1, then return Yes, otherwise return No) As you see, the IF function can be used to evaluate both text and values. It can also be used to  evaluate errors . You are not limited to only checking if one thing is equal to another and returning a single result, you can also use mathematical operators and perform additional calculations depending on your criteria. You can also nest multiple IF functions together in order

Convert numbers stored as text to numbers

  Convert numbers stored as text to numbers Use Paste Special and Multiply  If the steps above didn't work, you can use this method, which can be used if you're trying to convert more than one column of text. Select a blank cell that doesn't have this problem, type the number 1 into it, and then press  Enter . Press  Ctrl + C  to copy the cell. Select the cells that have numbers stored as text. On the Home tab, select  Paste  >  Paste Special . Select  Multiply , and then click  OK . Excel multiplies each cell by 1, and in doing so, converts the text to numbers. Second Method: 1- Select range  2- Type short key=  Alt+D+E+F