Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel 2000 - need to look up fist value in a row and fill a cel with t 1

Status
Not open for further replies.
Apr 17, 2001
28
CA
I have an excel spreadhseet with a row of 5 that i need to check against. They show: 5, 4, 3, 2, 1, or , , 3, 2, 1, or , , , , 1,. I need to fill a box with the first of the values that is not blank - I have over 700 rows to fill, thus a formula would simplify it. Thank you :)
 
I'm not exactly sure from your description whether I completely understand your situation, but here goes...

If your data is, for example in column "A", is as follows:
5,4,3,2,1
,4,3,2,1
, ,3,2,1
, , ,2,1
, , , ,1

...then the following formula will work: (place in column "B")

=IF(MID(A1,1,1)="5",5,IF(MID(A1,3,1)="4",4,IF(MID(A1,5,1)="3",3,IF(MID(A1,7,1)="2",2,IF(MID(A1,9,1)="1",1,"")))))

IF your numbers all have a "space" character before each one, then you will have to modify the formula - to increase the positions referred to by the "MID" function.

See how this fits. If you have any problem, please advise.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Dale - I'm sending you a small sample - I didn't make the post very clear - sorry. Thanks for your help. ;)
Ashok
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top