MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 30th, 2004, 12:24 PM   #1
haybob
 
Join Date: Feb 2004
Posts: 4
Default If without gaps

What i want is a formula which will look down the team of the month column and place that month name into the column of the team which was team of the month. i have done a simple if formula but would like it if there wasnt spaces between the months like in column E.

******** ******************** ************************************************************************>
Microsoft Excel - Ex to Alan M.XLS___Running: xl2002 XP : OS = Windows XP
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)bout
=

B
C
D
E
F
G
2
Sheet*A*Sheet*B*
3
******
4
******
5
*Team*of*****
6
Datethe*Month*Arsenal*Records*
7
******
8
JanLeeds*Apr0*
9
FebLiverpool*July0*
10
MarLeeds*Aug0*
11
AprArsenal*SeptApr*
12
MayChelsea**0*
13
JunChelsea**0*
14
JulArsenal**Jul*
15
AugArsenal**Aug*
16
SeptArsenal**Sept*
Sheet1*

[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.
[/url]
haybob is offline   Reply With Quote
Old Mar 30th, 2004, 12:46 PM   #2
fairwinds
MrExcel MVP
 
fairwinds's Avatar
 
Join Date: May 2003
Posts: 8,445
Default Re: If without gaps

Hi,

******** ******************** ************************************************************************>
Microsoft Excel - Book1___Running: xl2000 : OS = Windows Windows 2000
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)bout
=

A
B
C
D
1
Sheet*A**Sheet*B
2
****
3
****
4
*Team*of***
5
Datethe*Month*Arsenal
6
****
7
JanLeeds*Apr
8
FebLiverpool*Jul
9
MarLeeds*Aug
10
AprArsenal*Sept
11
MayChelsea**
12
JunChelsea**
13
JulArsenal**
14
AugArsenal**
15
SeptArsenal**
Sheet4*

[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.


=IF(COUNTIF($B$7:$B$15,$D$5) > ROW()-ROW($A$7),INDEX($A$1:$A$15,SMALL(IF(($B$7:$B$15=$D$5),ROW($A$7:$A$15),""),ROW()-ROW($A$7)+1)),"")

Is entered with Ctrl + Shift + Enter in D7 and dragged down.
__________________
"Fair Winds and Following Seas"
fairwinds is offline   Reply With Quote
Old Mar 30th, 2004, 01:06 PM   #3
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 39,334
Default Re: If without gaps

Also by means of a faster working set of ordinary formulas...

******** ******************** ************************************************************************>
Microsoft Excel - Book5___Running: xl2000 : OS = Windows Windows 2000
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)bout
=

A
B
C
D
E
2
Sheet*A**Sheet*B*
3
*****
4
*****
5
*Team*of**4*
6
Datethe*Month*Arsenal0
7
JanLeeds*Apr*
8
FebLiverpool*Jul*
9
MarLeeds*Aug*
10
AprArsenal*Sept1
11
MayChelsea**
*
12
JunChelsea**
*
13
JulArsenal**
2
14
AugArsenal**
3
15
SeptArsenal**
4
16
*****
Sheet1*

[HtmlMaker 2.32] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.


D5:

=LOOKUP(9.99999999999999E+307,E:E)

D7, which is copied down:

=IF(ROW()-ROW($D$7)+1<=$D$5,INDEX(A:A,MATCH(ROW()-ROW($D$7)+1,E:E,0)),"")

E6 must house a 0.

E7, which is copied down:

=IF((A7<>"")*(B7<>"")*(B7=$D$6),LOOKUP(9.99999999999999E+307,$E$6:E6)+1,"")
Aladin Akyurek is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 09:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.