ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Looking for a macro/function in an excel spreadsheet (Help) (https://www.excelbanter.com/excel-worksheet-functions/128014-looking-macro-function-excel-spreadsheet-help.html)

Keith (Southend)

Looking for a macro/function in an excel spreadsheet (Help)
 
(Note: Please point me to the correct forum if this isn't the correct
place for this question)

I'm looking for a macro or something that I can place in a cell that
will look at 2 or more (Max 12) cells and return 1. Maximum number, 2.
Minimum number.

Max
eg: 12.5 13.5 14.5 15.6 12.5 11.5 returns 15.6

Min
eg: 12.5 13.5 14.5 15.6 12.5 11.5 returns 11.5

All the cells are in the same row, but NOT every column of the row wants
to be looked at, it maybe cells A1, D1, T1, AA2, AB3 etc (Other data is
in the other cells that I do not want to look at)

Basically, the data is derrived from a csv file which I import into
excel, the data is weather information containing elements such as max
and min temperature, wind gusts etc, all taken from different synop
times 03, 06, 09, 12 hours etc.

Any help would be much appreciated

If I need to make myself clearer please e-mail me on the address below
replacing at with @ and dot with .

Thanks
--
Keith (Southend)
http://www.southendweather.net
e-mail: kreh at southendweather dot net

David Biddulph

Looking for a macro/function in an excel spreadsheet (Help)
 
=MAX(A1, D1, T1, AA2, AB3)
=MIN(A1, D1, T1, AA2, AB3)
--
David Biddulph

"Keith (Southend)" wrote in message
...
(Note: Please point me to the correct forum if this isn't the correct
place for this question)

I'm looking for a macro or something that I can place in a cell that will
look at 2 or more (Max 12) cells and return 1. Maximum number, 2. Minimum
number.

Max
eg: 12.5 13.5 14.5 15.6 12.5 11.5 returns 15.6

Min
eg: 12.5 13.5 14.5 15.6 12.5 11.5 returns 11.5

All the cells are in the same row, but NOT every column of the row wants
to be looked at, it maybe cells A1, D1, T1, AA2, AB3 etc (Other data is in
the other cells that I do not want to look at)

Basically, the data is derrived from a csv file which I import into excel,
the data is weather information containing elements such as max and min
temperature, wind gusts etc, all taken from different synop times 03, 06,
09, 12 hours etc.

Any help would be much appreciated

If I need to make myself clearer please e-mail me on the address below
replacing at with @ and dot with .

Thanks
--
Keith (Southend)
http://www.southendweather.net
e-mail: kreh at southendweather dot net




Keith (Southend)

Looking for a macro/function in an excel spreadsheet (Help)
 
David Biddulph wrote:
=MAX(A1, D1, T1, AA2, AB3)
=MIN(A1, D1, T1, AA2, AB3)


Thank you David, I think I was just making to complicated, when the
solution was simple.

Best regards.
--
Keith (Southend)
http://www.southendweather.net
e-mail: kreh at southendweather dot net

Keith (Southend)

Looking for a macro/function in an excel spreadsheet (Help)
 
David Biddulph wrote:
=MAX(A1, D1, T1, AA2, AB3)
=MIN(A1, D1, T1, AA2, AB3)


Ok, now it get's a bit more complicated.

If the row has 'no data' (empty cells) it returns a '0', is there any
way I can get it to return a '-' for example or 'x', which would
indicate 'no data' as the '0' would appear misleading and in the case of
wind gust, one of my scenarios, not correct?

Sorry to extend this question.

Thanks
--
Keith (Southend)
http://www.southendweather.net
e-mail: kreh at southendweather dot net

Don Guillett

Looking for a macro/function in an excel spreadsheet (Help)
 
You could use
=IF(COUNT(A1,D1,T1)=0,"",MIN(A1,D1,T1))
--
Don Guillett
SalesAid Software

"Keith (Southend)" wrote in message
...
David Biddulph wrote:
=MAX(A1, D1, T1, AA2, AB3)
=MIN(A1, D1, T1, AA2, AB3)


Ok, now it get's a bit more complicated.

If the row has 'no data' (empty cells) it returns a '0', is there any way
I can get it to return a '-' for example or 'x', which would indicate 'no
data' as the '0' would appear misleading and in the case of wind gust, one
of my scenarios, not correct?

Sorry to extend this question.

Thanks
--
Keith (Southend)
http://www.southendweather.net
e-mail: kreh at southendweather dot net




Keith (Southend)

Looking for a macro/function in an excel spreadsheet (Help)
 
Don Guillett wrote:
You could use
=IF(COUNT(A1,D1,T1)=0,"",MIN(A1,D1,T1))


Yes, that does the job superbly.
I can add "-" or "x" and that's what it returns. :-)
I can also have as many or as few cells in the combinations. :-)
Change MIN to MAX where required.
This is great.

Many thanks again, much appreciated :-)

--
Keith (Southend)
http://www.southendweather.net
e-mail: kreh at southendweather dot net

Don Guillett

Looking for a macro/function in an excel spreadsheet (Help)
 
Glad to help. You will note that this still allows a REAL zero.

--
Don Guillett
SalesAid Software

"Keith (Southend)" wrote in message
...
Don Guillett wrote:
You could use
=IF(COUNT(A1,D1,T1)=0,"",MIN(A1,D1,T1))


Yes, that does the job superbly.
I can add "-" or "x" and that's what it returns. :-)
I can also have as many or as few cells in the combinations. :-)
Change MIN to MAX where required.
This is great.

Many thanks again, much appreciated :-)

--
Keith (Southend)
http://www.southendweather.net
e-mail: kreh at southendweather dot net





All times are GMT +1. The time now is 10:09 AM.

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