Formulas help

serge

Well-known Member
Joined
Oct 8, 2008
Messages
1,446
Office Version
  1. 2007
Platform
  1. Windows
Hi everyone,

I need help with 3 related formula please.

I have the following values in the following cells:

A1= 12
B1= 24
C1= 35
D1= 48
E1= 55

The 1st one in F1 would give me 1 if a number is made from 2 ODD digit.

The 2nd one in G1 would give me 1 if a number is made from 2 EVEN digit.

The 3Rd one in H1 would give me 1 if a number is made from 1 ODD and 1 EVEN digit.

For this example :
F1 would return : 2
G1 would return : 2
H1 would return : 1

Thank you in advance for any help... Serge.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
The 1st one in F1 would give me 1 if a number is made from 2 ODD digit.

The 2nd one in G1 would give me 1 if a number is made from 2 EVEN digit.

The 3Rd one in H1 would give me 1 if a number is made from 1 ODD and 1 EVEN digit.

So no matter what the two digits are the result is always 1?
 
Upvote 0
No, my bad if I explained it wrong, what ever the formulas would find that would be the answer.
Thank you JamesW
 
Upvote 0
"The 1st one in F1 would give me 1 if a number is made from 2 ODD digit."

How come this returns a 2 in your example from the number 12?
 
Upvote 0
Each formula would take the range A1:E1.

So F1 would return : 2 because the number 35 and 55 are made with 2 Odd digits each number.

and G1 would return : 2 because the number 24 and 48 are made with 2 Even digits each number.

and H1 would return : 1 because the number 12 is made with 1 Odd digit and 1 Even digit.

I hope it's a better explanation ?

Thank you.
 
Upvote 0
Can someone help me with this one please.

Thank you.
 
Upvote 0
Can someone help me with this one please.

Thank you.

F1, control+shift+enter, not just enter:

=SUM(IF(LEN($A$1:$E$1)=2,IF(1-(MOD(MID($A$1:$E$1,1,1),2)=0),IF(1-(MOD(MID($A$1:$E$1,2,1),2)=0),1))))

G1, control+shift+enter, not just enter:

=SUM(IF(LEN($A$1:$E$1)=2,IF(MOD(MID($A$1:$E$1,1,1),2)=0,IF(MOD(MID($A$1:$E$1,2,1),2)=0,1))))

H1, control+shift+enter, not just enter:

=SUM(IF(LEN(A1:E1)=2,1))-SUM(F1:G1)
 
Upvote 0
Thank you Aladin,

This is not the first time that you have assisted me - appreciate all your help.

One question ,can a formula be put there without entering it with control+shift+enter, I'm not an excel master like you, trying to understand.

Thanks again... Serge.
 
Upvote 0
Thank you Aladin,

This is not the first time that you have assisted me - appreciate all your help.

You are welcome.

One question ,can a formula be put there without entering it with control+shift+enter, I'm not an excel master like you, trying to understand.

Thanks again... Serge.

You need to understand such eventually...

=SUM(IF(LEN(A$1)=2,IF(1-(MOD(MID(A$1,1,1),2)=0),IF(1-(MOD(MID(A$1,2,1),2)=0),1))))

This works on A1 and requires just enter.

You could put this in A2 and copy across, giving you a set of results. If you sum the results, you will get the count which exactly the same as the one in F1, produced by the formula that works on the whole range of A1:E1 at once. Working on whole range using IF's requires an array formula, which must be signalled to Excel with control+shift+enter.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,728
Members
452,939
Latest member
WCrawford

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