Formula woes...

tlynn

Board Regular
Joined
Aug 28, 2006
Messages
137
Office Version
  1. 365
Platform
  1. Windows
=IF(C12="","",IF(C12<>C10,IF(LEFT(C12,2)=47,47,"")))

I know that the "LEFT" function is text based, but it was a last ditch effort to get this to work.

Basically it starts by checking to see if c12 is filled or not...works fine. Then it goes on to see if c12 is different from c10 and if it is, is it filled with a 5 digit number starting with 47? If it is then the cell that this formula is nested in will, rather, should put a 47 in it and if there is not then the cell should remain blank or empty.

Any suggestions?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi

Have you tried

IF(C12="","",IF(C12<>C10,IF(And(Len(C12)=5,LEFT(C12,2)="47"),47,"")))

Left function returns string type result.
 
Upvote 0
so if c10 said 47555 and c12 said 47111 the formula should return 47

but if either c10 and c12 is blank, or if either start with something other then 47, or if they are identical numbers the formula should reutn a blank?
 
Upvote 0
Jindon, no dice...if c10 and c12 are the same I get "FALSE"..if they are the same it should basically make the cell empty.

I think you are correct Debooo...

if c10 and c12 are the same the cell this formula is nested in should be blank. If c12 is different it should basically pop up a 47 in the cell.
 
Upvote 0
Maybe I am making this formula too difficult. If that is the case, any suggestion on a different way to do it would be appreciated...
 
Upvote 0
=IF(C12="","",IF(C12<>C10,IF(LEFT(C12,2)=47,47,"")))

I know that the "LEFT" function is text based, but it was a last ditch effort to get this to work.

Basically it starts by checking to see if c12 is filled or not...works fine. Then it goes on to see if c12 is different from c10 and if it is, is it filled with a 5 digit number starting with 47? If it is then the cell that this formula is nested in will, rather, should put a 47 in it and if there is not then the cell should remain blank or empty.

Any suggestions?

Hi tlynn:

How about ...
Code:
=IF(C12="","",IF(C12<>C10,IF(LEFT(C12,2)="47",47,"")))
Does this work for you now?
 
Upvote 0
=IF(C12="","",IF(C12<>C10,IF(AND(LEN(C12)=5,LEFT(C12,2)="47"),47," ")," "))

i barely tweeked the formula above, is this what you wanted?
 
Upvote 0
Again no dice...funny thing is that was one of the original ways I tried it. when C10 and c12 are the same I get a false statement...if both cells are the same the cell should remain blank. Any other suggestions?
 
Upvote 0
Debooo you are a rock star! Perfect! Thank you all for your help on this one.
 
Upvote 0

Forum statistics

Threads
1,214,659
Messages
6,120,784
Members
448,992
Latest member
prabhuk279

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