Excel Function : FindColumn

Navigate back to home page
z/OS related collateral
Windows related collateral
SQL/mySQL related collateral
Link to code that can be used on websites.
Link to ASL Program Documentation
All our latest news
Contacting Abbydale Systems
Obtain product support/suggestions
Terms and conditions for the site
General disclaimer
All about Abbydale Systems
How we got our company name
Our privacy policy
Our development strategy
Visit our guestbook

As ever, you use this free program at your own risk.

Feel free to use the free software on this site but please honor the copyright.

FindColumn is an Excel™ VBA Function that will look for the first occurrence of the passed string in a column and return the column number.

There are three possible parameters, the first one is required the others are optional.

These parameters are:

  1. (Required) The string to be searched for.

  2. (Optional) The worksheet to be searched. If omitted then "Dashboard" will be used.

  3. (Optional) True or False. This tells FindColumn whether a partial match is allowed or not. The default is False so the entire string must match the entire column contents (xlWhole used). True would allow a partial match (xlPart used).

To illustrate the use of FindColumn we will use the following worksheet named "Demo".

FindColumn Demo Sheet


Using the above worksheet the following code would return value of 4 (i.e the first column with the word "Value" in it)

FindColumn("Value", "Demo", True)

However coding:

FindColumn("Value", "Demo", False)


would return a value of 0 as no column contains only the word "Value".


if, however you code:

FindColumn("Value", "Book Demo", False)


a value of 5 will be returned.

FindColumn will find the text in any row, not just the first, for example:

FindColumn("Eisenhower", "Demo")


will return a value of 6.


Note:
FindColumnrequires the subroutine WorksheetExtant to be available.



Link
Description
This link will take you to the source code for FindColumn.

As FindColumn calls WorkSheetExtant you will need to download it and place it in the same workbook.



This link will take you to the source code for WorkSheetExtant.




If you need any support or assistance with any of the code on this site
or
if you would just like to contact us, please click here

follow us on facebook
Follow us on Facebook




Subscribe to our YouTube Channel Subscribe to our YouTube channel


CBT Tape Home Page MVS and OS/390 Freeware Link to the CBT website


Copyright © Abbydale Systems LLC 2015-2026

Abbydale Systems LLC Lic. 802696149. All rights reserved.