• 470K Members
• 5,703 Online
• 568K Conversations
SOLVED

## Which formula can use for identify the number and ignore the text

Occasional Contributor

# Which formula can use for identify the number and ignore the text

Hello,

I have some issue to calculate one sheet to another. Because my first sheet has number and text in one shell and same thing in other sheet with drop down list. Please see below. How i can solve this issue ?

21 Replies

# Re: Which formula can use for identify the number and ignore the text

You can wrap your formula within IFERROR to handle the error like this...

``=IFERROR(IF(Table19[@[01-Aug-19]]>0,"A ("&8-Table19[@[01-Aug-19]]-Table110[@[01-Aug-19]]&")","A"),"A")``

# Re: Which formula can use for identify the number and ignore the text

Hello,

Thank you for your advice. But i tried already and is give me answer noly "A". Is not calculate the number from other sheet.

If you look on sheet2 than you will see that there is " IT Issues 2 ". However, i need that whenever i do calculation on sheet1 cell, just identify number which is in sheet2 (" IT Issues 2 ") and ignore the text.

# Re: Which formula can use for identify the number and ignore the text

You can use ISNUMBER function to identify whether the cell content is a numeric value or a text value.

Assuming you are trying to subtract the two cells A2 and B2 and both A2 and B2 may contains either a numeric value or a numeric value preceded by a space and then a text string, you may try the below formula to subtract the two cells as below...

``=IF(ISNUMBER(A2),A2,TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",LEN(A2))),LEN(A2))))-IF(ISNUMBER(B2),B2,TRIM(RIGHT(SUBSTITUTE(B2," ",REPT(" ",LEN(B2))),LEN(B2))))``

You can use similar approach in your formula for the True part and replace the A2 and B2 in the above formula with the table cell references and see if that works for you.

# Re: Which formula can use for identify the number and ignore the text

Perhaps

``=(--A2)-(--B2)``

shall work

# Re: Which formula can use for identify the number and ignore the text

What I have understood as per the description so far is, a cell can either contain a numeric values or a text followed by a numeric value like "IT Issues 2" where 2 maybe any numeric value and OP is interested in 2 in this case.

# Re: Which formula can use for identify the number and ignore the text

Hello,

Yes, you are right. as i said am only interested to identify only number (Which is sheet2 " IT Issues 2 ") and minus with other sheet shell (Minus alway with 8).

Now please not that, In sheet1 shell if sheet2 shell have no value then print as " A " then calculate " 8 - 2" and print " A (6) ".

I hope now you will understand and help me for it.

Thank you.

# Re: Which formula can use for identify the number and ignore the text

Okay, try this and see if that works for you...

``=IF(Table19[@[01-Aug-19]]>0,"A ("&8-IF(ISNUMBER(Table19[@[01-Aug-19]]),Table19[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table19[@[01-Aug-19]]," ",REPT(" ",LEN(Table19[@[01-Aug-19]]))),LEN(Table19[@[01-Aug-19]]))))-IF(ISNUMBER(Table110[@[01-Aug-19]]),Table110[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table110[@[01-Aug-19]]," ",REPT(" ",LEN(Table110[@[01-Aug-19]]))),LEN(Table110[@[01-Aug-19]]))))&")","A")``

# Re: Which formula can use for identify the number and ignore the text

Or maybe this, replacing the condition also...

``=IF(IF(ISNUMBER(Table19[@[01-Aug-19]]),Table19[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table19[@[01-Aug-19]]," ",REPT(" ",LEN(Table19[@[01-Aug-19]]))),LEN(Table19[@[01-Aug-19]]))))>0,"A ("&8-IF(ISNUMBER(Table19[@[01-Aug-19]]),Table19[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table19[@[01-Aug-19]]," ",REPT(" ",LEN(Table19[@[01-Aug-19]]))),LEN(Table19[@[01-Aug-19]]))))-IF(ISNUMBER(Table110[@[01-Aug-19]]),Table110[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table110[@[01-Aug-19]]," ",REPT(" ",LEN(Table110[@[01-Aug-19]]))),LEN(Table110[@[01-Aug-19]]))))&")","A")``

Btw how the data gets populated in those tables? Are these manual entries or imported from an external source? If those are the manual entries, you may put a validation rule so that the table only accepts a numeric input in those table columns.

# Re: Which formula can use for identify the number and ignore the text

Hey Sergei,

I have one thing to ask you. Is Dynamic Arrays Functions are available in Office 365 Pro Plus Version 1808 ?

If not then what i have to do for get this function ?

# Re: Which formula can use for identify the number and ignore the text

Hello Subodh,

If i put data in sheet2 shell manually then your first formula is worked. But i have already plan to put there data validation by list (On sheet2 shell) (please see attachment).

So now how can i do that ?

# Re: Which formula can use for identify the number and ignore the text

I see. Another variant could be

``````="A" &
IFERROR(" (" & 8-
RIGHT(Table19[@[01-Aug-19]], LEN(Table19[@[01-Aug-19]]) -MIN(FIND({0,1,2,3,4,5,6,7,8,9},Table19 [@[01-Aug-19]]&"0123456789"))+1) -
RIGHT(Table110[@[01-Aug-19]],LEN(Table110[@[01-Aug-19]])-MIN(FIND({0,1,2,3,4,5,6,7,8,9},Table110[@[01-Aug-19]]&"0123456789"))+1) &
")",
"")
``````

(I didn't test), but that's practically the same.

# Re: Which formula can use for identify the number and ignore the text

Dynamic Arrays are available for Office 365 subscribers Insiders Fast and Monthly Targeted (former Insiders Slow) channels. I didn't check, but build 1808 most probably is on semi-annual channel, it has no Dynamic Arrays so far.

# Re: Which formula can use for identify the number and ignore the text

Yes, that should also work.

# Re: Which formula can use for identify the number and ignore the text

Hey Subodh,

This formula is working fine but one issue again coming. You can the attachments that sheet3 have value "0" then this formula is work but if in same shell (Sheet3) not data (Blank) than this formula is not working. Same with Sheet2 shell.

# Re: Which formula can use for identify the number and ignore the text

Yes, both formula is work. what if o can put value in sheet2 shell " IT Issues 2H ". so where i have cheng the formula ?

And also see my other replay. Because new problem is coming.

# Re: Which formula can use for identify the number and ignore the text

I am busy at the moment and maybe will look at your replies later.

Btw, upload the Excel file instead of images so that other experts can also have a look at your file and tweak the formula or offer different solutions.

# Re: Which formula can use for identify the number and ignore the text

Hey Subodh,

Good Morning !!!! : )

I hope today you can help me to resolve this two issue.

1) Both formula is working fine (See the below images Sheet1,2,3). If you can see the below images that sheet3 have value "0" then this formulas is work but if in same shell (Sheet3) not data (Blank) ( Sheet11,12,13 ) than this formulas is not working. Same with Sheet2 shell.

It should work like that, If sheet2 have data and sheet3 no data (Blank) then sheet1 do calculation (8-Sheet2 shell) but if sheet2 have no data as well sheet3 no data then sheet1 should print only " A ".

2) What if i can put value in sheet2 shell " IT Issues 2H ". so where i have Change the formula ?

# Re: Which formula can use for identify the number and ignore the text

Good morning Ashish!

You ignored my request and have posted the images again.

# Re: Which formula can use for identify the number and ignore the text

Hello,

Do you have any solution for me ?

Thank you.

# Re: Which formula can use for identify the number and ignore the text

It seems that you don't read my replies carefully. Please read my last two replies and respond accordingly.

Solution

# Re: Which formula can use for identify the number and ignore the text

Hello,

Good Morning  !!!! : )

1) Formula is working fine (See the below images Sheet1,2,3). If you can see the below images that sheet3 have value "0" then this formulas is work but if in same shell (Sheet3) not data (Blank) ( Sheet11,12,13 ) than this formulas is not working. Same with Sheet2 shell.

It should work like that, If sheet2 have data and sheet3 no data (Blank) then sheet1 do calculation (8-Sheet2 shell) but if sheet2 have no data as well sheet3 no data then sheet1 should print only " A ".

Formula :

=IF(Table19[@[01-Aug-19]]="Bank Holiday","Bank Holiday",IF(Table19[@[01-Aug-19]]="Holiday","Holiday",IF(Table19[@[01-Aug-19]]="Unpaid Leave","Unpaid Leave",IF(AND(IF(ISNUMBER(Table19[@[01-Aug-19]]),Table19[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table19[@[01-Aug-19]]," ",REPT(" ",LEN(Table19[@[01-Aug-19]]))),LEN(Table19[@[01-Aug-19]]))))>=0,IF(ISNUMBER(Table110[@[01-Aug-19]]),Table110[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table110[@[01-Aug-19]]," ",REPT(" ",LEN(Table110[@[01-Aug-19]]))),LEN(Table110[@[01-Aug-19]]))))>=0),"A ( "&8-IF(ISNUMBER(Table19[@[01-Aug-19]]),Table19[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table19[@[01-Aug-19]]," ",REPT(" ",LEN(Table19[@[01-Aug-19]]))),LEN(Table19[@[01-Aug-19]]))))-IF(ISNUMBER(Table110[@[01-Aug-19]]),Table110[@[01-Aug-19]],TRIM(RIGHT(SUBSTITUTE(Table110[@[01-Aug-19]]," ",REPT(" ",LEN(Table110[@[01-Aug-19]]))),LEN(Table110[@[01-Aug-19]]))))&"H )","A"))))

Please if you can help me.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
48 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies