Showing posts with label left. Show all posts
Showing posts with label left. Show all posts

Thursday, February 18, 2016

How to make left VLOOKUP in Excel - Use of MATCH and INDEX functions

If you want to make a vlookup to retrieve the information that is located on the left without changing the sequence of the columns, you can use a combination of Match and Index functions:
Match will retrieve the row number of the value you are looking for and Index will retrieve the value in the chosen column & corresponding row:
=INDEX(A:A,MATCH(E1,B:B,0))




Created by DoMyExcel.com © | Excel & VBA Consulting | Customized Excel Solutions starting at 29 USD
Services provided to Individuals and Businesses | Free Quote: DoMyExcel@gmail.com
 Visit DoMyEXCEL online consulting and receive free estimate!

Tuesday, October 13, 2015

How to move and resize an Excel chart or shape using a VBA macro

To move a chart to a specific cell or resize to be same as range:
Sub relocate()
Call move_chart_to_cell(Cells(1, 1))
Call resize_chart_same_as_range(Range("A1:E20"))
End Sub

Sub move_chart_to_cell(cell as range)
ActiveSheet.Shapes("MyChart").Left = cell.Left
ActiveSheet.Shapes("MyChart").Top = cell.Top
End Sub

Sub resize_chart_same_as_range(r as range)
ActiveSheet.Shapes("MyChart").Height = r.Height
ActiveSheet.Shapes("MyChart").Width = r.Width

End Sub

Before Macro run:



After Macro run:


Created by DoMyExcel.com © | Excel & VBA Consulting | Customized Excel Solutions starting at 29 USD
Services provided to Individuals and Businesses | Free Quote: DoMyExcel@gmail.com