Showing posts with label Excel. Show all posts
Showing posts with label Excel. Show all posts

Wednesday, April 28, 2021

Monday, November 9, 2020

Query Active Directory from Excel

This is and old post from Remko Weijnen with some comde to get information from Active Directory.

I had to lookup some users in Active Directory today which I received by mail. Offcourse I got full users name while I needed either samAccountName or full adsPath. Usually I write a small VBS script to do the lookup and paste this in Excel for further processing. But today I decided that an Excel function to do the lookup would be nice. So I wrote it.

The function is called GetAdsProp and allows you to search on a specific AD field in the whole AD tree and return the value of another field.

Friday, July 15, 2011

Excel macro for uppercase conversion


Here is an excel macro for convert to uppercase the text contained in the current cell or a selected range.

Sub Uppercase()
RowsCount = Selection.Rows.Count
ColumnsCount = Selection.Columns.Count
if RowsCount = 0 or ColumnsCount=0 then
   MsgBox "ERROR: Please select a range or cell"
else

 Set Area = Selection
 For Each Cell In Area
  
' Change to uppercase.    Cell.Value = UCase(Cell.value)
 Next Cell

end if End Sub

Monday, September 28, 2009