#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default IF Statement Help

I have two spreadsheets.

First spreadsheet contains 4 columns of data (A-D). A= sales rep,
B=customer, C=outbound, D=inbound.

Second spreadsheet contains numerous pages, all are indentical except that
each page contain data for a different sales rep.

I am trying to create an IF statement that would pull data from the first
spreadsheet for a particular tech. I tried this put it's not pulling all of
the data.

Below is basically searching column A for a sales rep by the name Wahlberg
and then if found taking the data in column B (customer) and putting it in a
column on my second spreadsheet.
=IF(sheet1!$$A$2:$A$200="Wahlberg",sheet1!$B$2:$B$ 200,"-")
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default IF Statement Help

Try this...

Names used in the formulas refer to:

SaleRep: refers to =Sheet1!$A$2:$A$100
Customer: refers to =Sheet1!$B$2:$B$100

On Sheet2:

A1 = some name like Wahlberg

Enter this formula in B1. This will return the count of records related to
Wahlberg

=COUNTIF(SalesRep,A1)

Enter this array formula** in C1. This will return the customer names
related to Wahlberg.

=IF(ROWS(C$1:C1)B$1,"",INDEX(Customer,SMALL(IF(Sa lesRep=A$1,ROW(Customer)),ROWS(C$1:C1))-MIN(ROW(Customer))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

Copy the formula in C1 down until you get blanks meaning all recods have
been extracted.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
I have two spreadsheets.

First spreadsheet contains 4 columns of data (A-D). A= sales rep,
B=customer, C=outbound, D=inbound.

Second spreadsheet contains numerous pages, all are indentical except that
each page contain data for a different sales rep.

I am trying to create an IF statement that would pull data from the first
spreadsheet for a particular tech. I tried this put it's not pulling all
of
the data.

Below is basically searching column A for a sales rep by the name Wahlberg
and then if found taking the data in column B (customer) and putting it in
a
column on my second spreadsheet.
=IF(sheet1!$$A$2:$A$200="Wahlberg",sheet1!$B$2:$B$ 200,"-")



  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF Statement Help

Guess you mean you have 2 workbooks. I'd take a couple of minutes to
simplify/consolidate the base data set-up like this: Insert a new sheet in
your "2nd spreadsheet", then do a one-time manual sequential copy n paste
special as values (in row2 down) from each of your identically structured
"numerous pages", stacking the data up (stacking order is immaterial). Then
just paste over the col headers, and you can now easily apply/use autofilter
and do pivot table analysis as well. You could also move over your "1st
spreadsheet" into the same book, and start your formulating from there,
reading the consol data in the new sheet. Much, much simpler this way,
believe me. Hit the YES below, won't you?
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Deema" wrote:
I have two spreadsheets.

First spreadsheet contains 4 columns of data (A-D). A= sales rep,
B=customer, C=outbound, D=inbound.

Second spreadsheet contains numerous pages, all are indentical except that
each page contain data for a different sales rep.

I am trying to create an IF statement that would pull data from the first
spreadsheet for a particular tech. I tried this put it's not pulling all of
the data.

Below is basically searching column A for a sales rep by the name Wahlberg
and then if found taking the data in column B (customer) and putting it in a
column on my second spreadsheet.
=IF(sheet1!$$A$2:$A$200="Wahlberg",sheet1!$B$2:$B$ 200,"-")

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default IF Statement Help

Hello T. Valko. Thank you this worked beautifully. If I may . . I have one
additional question.

On Sheet 2: I not only have to bring over the customer name (for each
particular tech) but also the number of OUtbound and Inbound calls.

On Sheet 1: Outbound was in column C and Inbound was in column D.

I tried revising the below formula to bring over the above data but am
receiving a #NAME? error. The below formula is for the

=IF(ROWS(D$2:D2)B$2,"",INDEX(Outbound,SMALL(IF(Sa lesRep=A$2,ROW(Outbound)),ROWS(D$2:D2))-MIN(ROW(Outbound))+1))

I must have something wrong? Any suggestions?? Thank you again!!!!!

"T. Valko" wrote:

Try this...

Names used in the formulas refer to:

SaleRep: refers to =Sheet1!$A$2:$A$100
Customer: refers to =Sheet1!$B$2:$B$100

On Sheet2:

A1 = some name like Wahlberg

Enter this formula in B1. This will return the count of records related to
Wahlberg

=COUNTIF(SalesRep,A1)

Enter this array formula** in C1. This will return the customer names
related to Wahlberg.

=IF(ROWS(C$1:C1)B$1,"",INDEX(Customer,SMALL(IF(Sa lesRep=A$1,ROW(Customer)),ROWS(C$1:C1))-MIN(ROW(Customer))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

Copy the formula in C1 down until you get blanks meaning all recods have
been extracted.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
I have two spreadsheets.

First spreadsheet contains 4 columns of data (A-D). A= sales rep,
B=customer, C=outbound, D=inbound.

Second spreadsheet contains numerous pages, all are indentical except that
each page contain data for a different sales rep.

I am trying to create an IF statement that would pull data from the first
spreadsheet for a particular tech. I tried this put it's not pulling all
of
the data.

Below is basically searching column A for a sales rep by the name Wahlberg
and then if found taking the data in column B (customer) and putting it in
a
column on my second spreadsheet.
=IF(sheet1!$$A$2:$A$200="Wahlberg",sheet1!$B$2:$B$ 200,"-")




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default IF Statement Help

receiving a #NAME? error.
=IF(ROWS(D$2:D2)B$2,"",INDEX(Outbound,SMALL(IF(S alesRep=A$2,ROW(Outbound)),ROWS(D$2:D2))-MIN(ROW(Outbound))+1))


#NAME? means Excel doesn't recognize something in the formula. In the
formula I suggested I used named ranges and noted what those named ranges
refer to. So the formula that is returning #NAME? doesn't recognize either
Outbound or SalesRep or both.

Did you create named ranges called Outbound and SalesRep? If not, then
that's the problem.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
Hello T. Valko. Thank you this worked beautifully. If I may . . I have
one
additional question.

On Sheet 2: I not only have to bring over the customer name (for each
particular tech) but also the number of OUtbound and Inbound calls.

On Sheet 1: Outbound was in column C and Inbound was in column D.

I tried revising the below formula to bring over the above data but am
receiving a #NAME? error. The below formula is for the

=IF(ROWS(D$2:D2)B$2,"",INDEX(Outbound,SMALL(IF(Sa lesRep=A$2,ROW(Outbound)),ROWS(D$2:D2))-MIN(ROW(Outbound))+1))

I must have something wrong? Any suggestions?? Thank you again!!!!!

"T. Valko" wrote:

Try this...

Names used in the formulas refer to:

SaleRep: refers to =Sheet1!$A$2:$A$100
Customer: refers to =Sheet1!$B$2:$B$100

On Sheet2:

A1 = some name like Wahlberg

Enter this formula in B1. This will return the count of records related
to
Wahlberg

=COUNTIF(SalesRep,A1)

Enter this array formula** in C1. This will return the customer names
related to Wahlberg.

=IF(ROWS(C$1:C1)B$1,"",INDEX(Customer,SMALL(IF(Sa lesRep=A$1,ROW(Customer)),ROWS(C$1:C1))-MIN(ROW(Customer))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

Copy the formula in C1 down until you get blanks meaning all recods have
been extracted.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
I have two spreadsheets.

First spreadsheet contains 4 columns of data (A-D). A= sales rep,
B=customer, C=outbound, D=inbound.

Second spreadsheet contains numerous pages, all are indentical except
that
each page contain data for a different sales rep.

I am trying to create an IF statement that would pull data from the
first
spreadsheet for a particular tech. I tried this put it's not pulling
all
of
the data.

Below is basically searching column A for a sales rep by the name
Wahlberg
and then if found taking the data in column B (customer) and putting it
in
a
column on my second spreadsheet.
=IF(sheet1!$$A$2:$A$200="Wahlberg",sheet1!$B$2:$B$ 200,"-")








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default IF Statement Help

Thank you again T. Valko . . . I did set up the name ranges but my formula
contained a misspelling in my range range - Inboud instead of Inbound. Thank
you, this works awesome!!!!

"T. Valko" wrote:

receiving a #NAME? error.
=IF(ROWS(D$2:D2)B$2,"",INDEX(Outbound,SMALL(IF(S alesRep=A$2,ROW(Outbound)),ROWS(D$2:D2))-MIN(ROW(Outbound))+1))


#NAME? means Excel doesn't recognize something in the formula. In the
formula I suggested I used named ranges and noted what those named ranges
refer to. So the formula that is returning #NAME? doesn't recognize either
Outbound or SalesRep or both.

Did you create named ranges called Outbound and SalesRep? If not, then
that's the problem.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
Hello T. Valko. Thank you this worked beautifully. If I may . . I have
one
additional question.

On Sheet 2: I not only have to bring over the customer name (for each
particular tech) but also the number of OUtbound and Inbound calls.

On Sheet 1: Outbound was in column C and Inbound was in column D.

I tried revising the below formula to bring over the above data but am
receiving a #NAME? error. The below formula is for the

=IF(ROWS(D$2:D2)B$2,"",INDEX(Outbound,SMALL(IF(Sa lesRep=A$2,ROW(Outbound)),ROWS(D$2:D2))-MIN(ROW(Outbound))+1))

I must have something wrong? Any suggestions?? Thank you again!!!!!

"T. Valko" wrote:

Try this...

Names used in the formulas refer to:

SaleRep: refers to =Sheet1!$A$2:$A$100
Customer: refers to =Sheet1!$B$2:$B$100

On Sheet2:

A1 = some name like Wahlberg

Enter this formula in B1. This will return the count of records related
to
Wahlberg

=COUNTIF(SalesRep,A1)

Enter this array formula** in C1. This will return the customer names
related to Wahlberg.

=IF(ROWS(C$1:C1)B$1,"",INDEX(Customer,SMALL(IF(Sa lesRep=A$1,ROW(Customer)),ROWS(C$1:C1))-MIN(ROW(Customer))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

Copy the formula in C1 down until you get blanks meaning all recods have
been extracted.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
I have two spreadsheets.

First spreadsheet contains 4 columns of data (A-D). A= sales rep,
B=customer, C=outbound, D=inbound.

Second spreadsheet contains numerous pages, all are indentical except
that
each page contain data for a different sales rep.

I am trying to create an IF statement that would pull data from the
first
spreadsheet for a particular tech. I tried this put it's not pulling
all
of
the data.

Below is basically searching column A for a sales rep by the name
Wahlberg
and then if found taking the data in column B (customer) and putting it
in
a
column on my second spreadsheet.
=IF(sheet1!$$A$2:$A$200="Wahlberg",sheet1!$B$2:$B$ 200,"-")






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default IF Statement Help

Good deal! Thanks for the feedback.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
Thank you again T. Valko . . . I did set up the name ranges but my formula
contained a misspelling in my range range - Inboud instead of Inbound.
Thank
you, this works awesome!!!!

"T. Valko" wrote:

receiving a #NAME? error.
=IF(ROWS(D$2:D2)B$2,"",INDEX(Outbound,SMALL(IF(S alesRep=A$2,ROW(Outbound)),ROWS(D$2:D2))-MIN(ROW(Outbound))+1))


#NAME? means Excel doesn't recognize something in the formula. In the
formula I suggested I used named ranges and noted what those named ranges
refer to. So the formula that is returning #NAME? doesn't recognize
either
Outbound or SalesRep or both.

Did you create named ranges called Outbound and SalesRep? If not, then
that's the problem.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
Hello T. Valko. Thank you this worked beautifully. If I may . . I
have
one
additional question.

On Sheet 2: I not only have to bring over the customer name (for each
particular tech) but also the number of OUtbound and Inbound calls.

On Sheet 1: Outbound was in column C and Inbound was in column D.

I tried revising the below formula to bring over the above data but am
receiving a #NAME? error. The below formula is for the

=IF(ROWS(D$2:D2)B$2,"",INDEX(Outbound,SMALL(IF(Sa lesRep=A$2,ROW(Outbound)),ROWS(D$2:D2))-MIN(ROW(Outbound))+1))

I must have something wrong? Any suggestions?? Thank you again!!!!!

"T. Valko" wrote:

Try this...

Names used in the formulas refer to:

SaleRep: refers to =Sheet1!$A$2:$A$100
Customer: refers to =Sheet1!$B$2:$B$100

On Sheet2:

A1 = some name like Wahlberg

Enter this formula in B1. This will return the count of records
related
to
Wahlberg

=COUNTIF(SalesRep,A1)

Enter this array formula** in C1. This will return the customer names
related to Wahlberg.

=IF(ROWS(C$1:C1)B$1,"",INDEX(Customer,SMALL(IF(Sa lesRep=A$1,ROW(Customer)),ROWS(C$1:C1))-MIN(ROW(Customer))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

Copy the formula in C1 down until you get blanks meaning all recods
have
been extracted.

--
Biff
Microsoft Excel MVP


"Deema" wrote in message
...
I have two spreadsheets.

First spreadsheet contains 4 columns of data (A-D). A= sales rep,
B=customer, C=outbound, D=inbound.

Second spreadsheet contains numerous pages, all are indentical
except
that
each page contain data for a different sales rep.

I am trying to create an IF statement that would pull data from the
first
spreadsheet for a particular tech. I tried this put it's not
pulling
all
of
the data.

Below is basically searching column A for a sales rep by the name
Wahlberg
and then if found taking the data in column B (customer) and putting
it
in
a
column on my second spreadsheet.
=IF(sheet1!$$A$2:$A$200="Wahlberg",sheet1!$B$2:$B$ 200,"-")








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
SUMIF statement with AND statement Eric D Excel Discussion (Misc queries) 2 July 14th 08 07:24 PM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 02:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"