• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Search results

  1. A

    UDF to extract hyperlink address from a cell

    If you want to extract hyperlink address from a cell. Try this udf- Function hyperlink_extcell(cell As Range) If cell.Hyperlinks.Count > 0 Then hyperlink_extcell = cell.Hyperlinks(1).Address Else hyperlink_extcell = "Hyperlink Not Found" End If End Function
  2. A

    Pick/Extract a word by position from a cell

    If you to extract/pick a word by its postion from a cell . For example 1) Input: Procter & Gamble Output(Pick 3rd word): Gamble 2) Input: Procter,&,Gamble Output(Pick 1st word): Procter Try this udf : Function pick_word(str1 As String, spl As String, positon As Integer) Dim arr1 arr1 =...
  3. A

    UDF to concatenate first letter of each word in a cell

    If you want to concatenate the first letter of each word in a cell .For example - Input Output Johnson & Johnson J & J Procter & Gamble P & G Boston Consulting Group B C G Try this udf Function con_1stletter(str1 As String) Dim arr1, i As...
  4. A

    UDF to find Latitude and Longitude of any address using MapQuest API and VBA

    If you want to find the Latitude and Longitude of any address using MapQuest . Try this UDF- To know more about MapQuest API visit - http://open.mapquestapi.com/geocoding/ Function lat_lon_mapquest(a_t As String, c_t As String, s_t As String, co_t As String, z_t As String) Dim sURL As String...
  5. A

    UDF to concatenate non blank cells in a range

    If you want to concatenate non blank cells in a range. Function concatenate_nonblanks(irng As Range, spl As String) Dim cell As Range Dim rsl As String For Each cell In irng If cell <> vbNullString Then rsl = rsl & spl & cell End If Next concatenate_nonblanks = Right(rsl, Len(rsl) -...
  6. A

    UDF to check if cell is bold or Not

    If you want to check if cell is BOLD or not . Try this UDF- Function Is_Bold(xa As Range) Is_Bold = xa.Font.Bold End Function It will return True if Cell is bold and False if not
  7. A

    UDF to find RGB Value of a color

    If you want to know the RGB Value of a Fill color . Try this UDF Function rgb_color(cl As Range) As String Dim rgbc As Long, rc As Long, gc As Long, bc As Long If cl.Cells.Count = 1 Then rc = cl.Interior.Color Mod 256 rgbc = Int(cl.Interior.Color / 256) gc = rgbc Mod 256 bc = Int(rgbc / 256)...
  8. A

    UDF to Extract Comment from a Cell

    If you want to extract the comment from a cell. Try this UDF- Function extract_comment(cmt_rng As Range) As String If Not cmt_rng.Comment Is Nothing Then extract_comment = cmt_rng.Comment.Text Else extract_comment = &#34;No Comment Found&#34; End If End Function
  9. A

    Navigate through all the worksheet and Press Ctrl + Home Using VBA

    If you want to select the first cell after freeze pane on each worksheet and save it. So that when user opens the workbook he/she do not have to press CTRL+ Home in each worksheet to go to first cell. Here is the code - Sub goto_first_cell_in_each_worksheet() Dim wk As Worksheet For Each wk In...
  10. A

    Find The First Cell After Freeze Pane

    If you want to know the first cell after the freeze pane . Try this code- Sub find_first_cell_after_freeze_pane() If ActiveWindow.SplitRow = 0 And ActiveWindow.SplitColumn = 0 Then MsgBox &#34;No freeze Pane Found&#34; Exit Sub Else MsgBox Cells(ActiveWindow.SplitRow + 1...
  11. A

    Find Distance and Time between two cities using Google API In excel

    If you want to know the distance between two cities by passing the address of destination and Origin place using "Google Distance Matrix API" in VBA. Download Working File https://www.box.com/s/3ai8xgasra8kpsgt40lq Copy the below udf and paste it any new module of your workbook Public...
  12. A

    Find Distance between two places by passing Latitude and Longitude

    If you want to find the distance and time taken between tow places by passing the Latitude and Longitude of Origin and Destination Via VBA Excel and Google Map. Here is the UDF Public Function get_dis_and_time(lat_1 As String, lon_1 As String, lat_2 As String, lon_2 As String) ' Read more...
  13. A

    Save a range as HTML Table

    If you want to save a range as HTML table on HTML webpage. Here is the code Download Working File https://www.box.com/s/7h58p020dasqcp01ayov Sub send_range_as_html_table() ‘ used to insert a line ( press enter) ‘ create a table using html ‘ check the link below to know more about html...
  14. A

    Find Latitude and Longitude of any address using Google Map API and VBA

    If you want to find Latitude and Longitude of any address . Download Working File https://www.box.com/s/h733p8zufxkkum8nsi2d Here is the UDF Function lat_lon(a_t As String, c_t As String, s_t As String, co_t As String, z_t As String) Dim sURL As String Dim BodyTxt As String Dim apan As...
  15. A

    Names of all the folders in a folder Excluding Sub folder

    If you want to get the names of all the folders in a directory/folder ( Excluding Sub folders).Try below code- Sub folder_names_in_a_directory_excluding_subfolder() Application.ScreenUpdating = False Dim fldpath Dim fso As Object, j As Long, folder, SubFolders, SubFolder With...
  16. A

    Names of all the folders in a folder Including Sub folder

    If you want to get the names of all the folders stored/created in a directory/folder ( Including Sub folders).Try below code- Sub folder_names_including_subfolder() Application.ScreenUpdating = False Dim fldpath Dim fso As Object, j As Long, folder1 As Object With...
  17. A

    Add a New menu on Mouse right for workbook Navigation

    If you want to add a new menu on mouse right click showing you the list of all open workbooks and worksheets in each of these workbooks. So that you can navigate easily. Add this to workbook Module Private Sub Workbook_Open() &#39;http://www.excelvbamacros.com/2012/04/blog-post.html On Error...
Back
Top