ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel VBA (https://www.excelbanter.com/excel-discussion-misc-queries/50478-excel-vba.html)

magix

Excel VBA
 
Hi,

I would like to achieve two things in my excel vbscript.
1. check if there is any value in any cell in a column
2. If there is/are value(s), find the Highest value.

Any helps ?

Magix



Bob Phillips

See response in public.excel

--

HTH

RP
(remove nothere from the email address if mailing direct)


"magix" wrote in message
...
Hi,

I would like to achieve two things in my excel vbscript.
1. check if there is any value in any cell in a column
2. If there is/are value(s), find the Highest value.

Any helps ?

Magix





Todkerr

You could use worksheet functions in your code to do this. for example:

Application.WorksheetFunction.Count(ActiveSheet.Ra nge("H:H"))
will return a msg box with the number of cells that return a value in column
H. Create an if statement for 0.....etc.

Application.WorksheetFunction.Large(ActiveSheet.Ra nge("H:H"), 1)
will return the larges value in column H

HTH

"magix" wrote:

Hi,

I would like to achieve two things in my excel vbscript.
1. check if there is any value in any cell in a column
2. If there is/are value(s), find the Highest value.

Any helps ?

Magix





All times are GMT +1. The time now is 09:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com