How can I get 1,1,0 if I have string, string, blank

Status
Not open for further replies.

guybrown

Board Regular
Joined
Jul 2, 2008
Messages
100
If I have text strings in A1 and B1 and C1 is blank, how can I get an array of 1,1,0?

eg. cat, dog, [blank]
{=--(cat, dog, [blank])} ???
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Where do you want the 1,1,0 array? Are you looking for a formula or vba? Give us a bit more detail about what you have and what you are trying to achieve.
 
Upvote 0
Where do you want the 1,1,0 array? Are you looking for a formula or vba? Give us a bit more detail about what you have and what you are trying to achieve.

Peter

It's related to a previous post http://www.mrexcel.com/forum/showthread.php?t=561916
I think this previous post was too complicated/unclear for anyone to respond so I'm trying to work it out myself.

Maybe I could use --istext(range) to get 1,1,0

then use --istext(drinks required) to get<TABLE style="WIDTH: 273pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=364><COLGROUP><COL style="WIDTH: 273pt; mso-width-source: userset; mso-width-alt: 13312" width=364><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; WIDTH: 273pt; HEIGHT: 15pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl65 height=20 width=364>1,1,0;0,1,1;0,1,0;1,0,1;1,0,1</TD></TR></TBODY></TABLE>

multiply them to get
<TABLE style="WIDTH: 273pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=364><COLGROUP><COL style="WIDTH: 273pt; mso-width-source: userset; mso-width-alt: 13312" width=364><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; WIDTH: 273pt; HEIGHT: 15pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl65 height=20 width=364>1,1,0;0,1,0;0,1,0;1,0,0;1,0,0</TD></TR></TBODY></TABLE>

combine rows to get
<TABLE style="WIDTH: 273pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=364><COLGROUP><COL style="WIDTH: 273pt; mso-width-source: userset; mso-width-alt: 13312" width=364><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; WIDTH: 273pt; HEIGHT: 15pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl65 height=20 width=364>2;1;1;1;1</TD></TR></TBODY></TABLE>

x by 1 to get
<TABLE style="WIDTH: 273pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=364><COLGROUP><COL style="WIDTH: 273pt; mso-width-source: userset; mso-width-alt: 13312" width=364><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; WIDTH: 273pt; HEIGHT: 15pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl65 height=20 width=364>1;1;1;1;1</TD></TR></TBODY></TABLE>

then concatenate drink strings where there is a 1 ie all 5 drinks on day 1.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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