Max function to work on text in cells

L

Legacy 33122

Guest
I have 10 odd columns that contain text, not numbers, thus I can't use the max function.

There is only one entry in each column for the ten columns per item. I want to return the cell with text entered into one cell at the end of the range. I could use 7 imbedded if statments and then place another 3 if statements into another cell to test if the cells in the range are above 0, however, this is clumsy! Is there another way to do it?

Any help would be appreciated.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Looks like you want the last text entry. If so:

=LOOKUP(REPT("z",255),Range)

If not, try to elaborate and include the data range in your follow up.
 
Upvote 0
Or if you actually wanted the address of the Cell it was in:-

=ADDRESS(MATCH(REPT("z",255),A1:A15),COLUMN(A1),4)
if the cell address was to go at the bottom of the columns

or

=ADDRESS(ROW(A1),MATCH(REPT("z",255),A1:K1),4)
if the cell address was to go to the right of the columns
 
Upvote 0
KenWright said:
Or if you actually wanted the address of the Cell it was in:-

=ADDRESS(MATCH(REPT("z",255),A1:A15),COLUMN(A1),4)
if the cell address was to go at the bottom of the columns

or

=ADDRESS(ROW(A1),MATCH(REPT("z",255),A1:K1),4)
if the cell address was to go to the right of the columns

Easier...

=CELL("Address",INDEX(Range,MATCH(REPT("z",255),Range)))

If needed, de-dollarize the result with SUBSTITUTE.
 
Upvote 0
I have never posted an actual version of a spreadsheet to this website before, how can I do it? I have tried all the responses and none seems to do the trick. Obviously it would be simpler if you could see the data in question?
 
Upvote 0
timothye said:
I have never posted an actual version of a spreadsheet to this website before, how can I do it? I have tried all the responses and none seems to do the trick. Obviously it would be simpler if you could see the data in question?

Here with an exhibit of how the formulas work, presupposing that we understood the task...
Book6
ABCDEFGHIJKLM
1
2xcsdramtakyy
3
4
5
6Lasttextvaluekyy
7Address$F$2
8
Sheet1


Formulas...

B6:

=LOOKUP(REPT("z",255),B2:M2)

Fetches the last text value from the range B2:M2.

B7:

=CELL("Address",INDEX(B2:M2,MATCH(REPT("z",255),B2:M2)))

Returns the address of the last text value from the range B2:M2.

Is this what you were looking for?
 
Upvote 0
Sort of.

The columns B through to M would only have one entry in each row, i.e. in row 2 there would only be one text entry, say kyy in row2, column F. The next row down would only contain one cell entry, i.e. say dra in row3, column C.

Having identified this I would want whatever this value was per row for the range of B through to M to be inserted into a column at the end of the range, i.e. in Column N per row.

Hope this makes it a little clearer?

Appreciate the help!
 
Upvote 0
timothye said:
Sort of.

The columns B through to M would only have one entry in each row, i.e. in row 2 there would only be one text entry, say kyy in row2, column F. The next row down would only contain one cell entry, i.e. say dra in row3, column C.

Having identified this I would want whatever this value was per row for the range of B through to M to be inserted into a column at the end of the range, i.e. in Column N per row.

Hope this makes it a little clearer?

Appreciate the help!

The formula will work per row. Why don't you just try by putting the formula in N2 and copying it down?
 
Upvote 0
Your right, I'm an idiot. It did work! Apologies for that.

Just so I can get my head around your formula, I understand what a lookup is and the repeat function for the repitition of designated text, I don't understand the use of "z" and the 255?
 
Upvote 0

Forum statistics

Threads
1,203,683
Messages
6,056,728
Members
444,887
Latest member
cvcc_wt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top