Excel question

polarmystery

Diamond Member
Aug 21, 2005
3,888
8
81
(Mods please feel free to move if this is in the wrong forum, wasn't sure where to put it)

Got a question for those that are good in excel. Is there any way in excel to return a value TRUE when the condition below is met, and a FALSE when it isn’t?

$10N1701\ \XA04\-\B50BT\
- I want the above to return false

Note:
It is separated like this: Signal name\ \connector\-\connector-pin\
It is false because there is only one connector and pin name attached to a signal

+3.3VDC_1\ \JB04\-\003\ \JB04\-\009\
-I want this to return true

Since there is more than one \connector\-\connector-pin\ combo, it needs to return TRUE.
Any ideas? The file I’m using is an export from a board design using a Mentor Graphics tool.
 
Last edited by a moderator:

rcpratt

Lifer
Jul 2, 2009
10,433
110
116
Give me a minute. I've gotten it to do the trues, working on the falses.
 

DeviousTrap

Diamond Member
Jul 19, 2002
4,841
0
71
All you need to do is just search is there's more than 1 "-", right?

If so:

=if(isnumber(search("*-*"&"*-*",a1)),true,false)
 

polarmystery

Diamond Member
Aug 21, 2005
3,888
8
81
All you need to do is just search is there's more than 1 "-", right?

If so:

=if(isnumber(search("*-*"&"*-*",a1)),true,false)

That worked close enough. Some of the signal names for some reason have a "-" in front to, so that formula returns true then. Is there a way to just search after the first "\" encountered in the string?
 

jersiq

Senior member
May 18, 2005
887
1
0
Not the most elegant, but you can give the search function a start location within the cell.

=if(isnumber(search("*-*"&"*-*",a1,3)),true,false)

for example would start your search on the third character in A1, thus omitting the first letter being a -
 

polarmystery

Diamond Member
Aug 21, 2005
3,888
8
81
Is there any way to return the pin connector, "B50BT" after a FALSE or TRUE condition?
 

rcpratt

Lifer
Jul 2, 2009
10,433
110
116
You always want to return that string, or do you want to return the last connector pin or something?
 

polarmystery

Diamond Member
Aug 21, 2005
3,888
8
81
You always want to return that string, or do you want to return the last connector pin or something?

Yeah, the connector pin. The B50BT was just an example. What I'm trying to do is find a connector, and return the connecting pins. Since the export adds all of these erroneous slashes to the file, I'm basically trying to make another file with its export.

The multiple connectors is corresponding to other pins from other connectors sharing the same signal.
 

DeviousTrap

Diamond Member
Jul 19, 2002
4,841
0
71
Yeah, the connector pin. The B50BT was just an example. What I'm trying to do is find a connector, and return the connecting pins. Since the export adds all of these erroneous slashes to the file, I'm basically trying to make another file with its export.

The multiple connectors is corresponding to other pins from other connectors sharing the same signal.

If I were you, I'd take the formula I posted and sort your date into two sections: those with one connector and then those with 2 connectors.

Then use the "Text to columns" function to separate everything into individual cells, you can set the delimiter to "/". You'll then be left with sortable data where the all of the connectors will be in one column.
 

polarmystery

Diamond Member
Aug 21, 2005
3,888
8
81
If I were you, I'd take the formula I posted and sort your date into two sections: those with one connector and then those with 2 connectors.

Then use the "Text to columns" function to separate everything into individual cells, you can set the delimiter to "/". You'll then be left with sortable data where the all of the connectors will be in one column.

Will that work if a few of the connectors (around 20+) have more than 2 connectors? Some of them have upwards of 30 connections to one signal (IE: ground and power connections).
 

SuPrEIVIE

Platinum Member
Aug 21, 2003
2,538
0
0
dont mean to hijack but i also have excel question but most likely easier and simpler solution, I want to print a certain area of a page but keep it in its position on the page how do i do that without messing with margins that would probably require trial and error? Evertime i highlight a print area for print on the page it wants to print it beginning at the top ( cant understand how MS office 2010 does not make this obvious to do) and I need it in its place in the document as I am adding information to a preprinted page.