Looking for a macro/function in an excel spreadsheet (Help)

K

Keith (Southend)

(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
 
K

Keith (Southend)

David said:
=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.
 
K

Keith (Southend)

David said:
=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
 
K

Keith (Southend)

Don said:
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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top