# istext

#### uk747

##### Well-known Member
=IF(ISTEXT(a3),a3,IF(ISTEXT(a2),a2,"")) cant seem to get the formula to work.A3 contains a formula and A2 doesnt. If the formula in A3 shows text based on a result then I want contents of A3 in A1, if A3 is "" then show A2 and if A2 is blank then ""

### Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Is A3 either some text or "", or could it be a number? (the "" is actually text too)

Try this...

Code:
=IF(AND(LEN(A3),ISTEXT(A3)),A3,IF(AND(LEN(A2),ISTEXT(A2)),A2,""))

There is nothing wrong with the formula.

Is A3 either some text or "", or could it be a number? (the "" is actually text too)
a3 is a formula based on other cells if the other cells are blank then A3 will show as blank

when the formula in A3 returns something ...what is that? What I mean by that is do you mean text or do you just mean not blank,
is a number coming over?

when the formula in A3 returns something ...what is that? What I mean by that is do you mean text or do you just mean not blank,is a number coming over?
the result of the formula is text.

Try this...
Code:
=IF(AND(LEN(A3),ISTEXT(A3)),A3,IF(AND(LEN(A2),ISTEXT(A2)),A2,""))
sorry only just seen your post. yes it did work Thanksif A4 was involved as well how would that slot into the formulaif a4 is blank then show a3, if a3 is blank then show a2 if a4 a3 and a2 are blank then a1 will be blank

Glad it helps you just duplicate one of the if function and change the cell reference like the below

Code:
=[COLOR=#0000cd]IF(AND(LEN([/COLOR][COLOR=#ff0000]A4[/COLOR][COLOR=#0000cd]),ISTEXT([/COLOR][COLOR=#ff0000]A4[/COLOR][COLOR=#0000cd])),[/COLOR][COLOR=#ff0000]A4[/COLOR],[COLOR=#0000cd]IF(AND(LEN(A3),ISTEXT(A3)),A3[/COLOR],[COLOR=#0000cd]IF(AND(LEN(A2),ISTEXT(A2)),A2[/COLOR],"")))

Replies
5
Views
164
Replies
4
Views
581
Replies
13
Views
320
Replies
9
Views
165
Replies
1
Views
237

1,196,274
Messages
6,014,390
Members
441,818
Latest member
itsfaisalkhalid

### 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.

### Which adblocker are you using?

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

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