Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default displaying text based on "TRUE" result from data comparison

hello all,

I have a workbook which I use to keep track of our sales for the month
/ year. I have tried to automate various pieces on each worksheet
(Jan - Dec) to eliminate manual data entry. I wrote the following to
display which territoy (North or South) the sale was made in based on
the salesman's initials:

----- TAKEN FROM CELL 10
=IF(OR(C10="AM",C10="BP",C10="JS",C10="SW",C10="WB "),"No.",
IF(OR(C10="JD",C10="KO",C10="PD",C10="SP"),"So."," "))
-----

however, I need to manually update this on each worksheet everytime a
salesman is hired, leaves, and/or moves to a new territory. I want to
develope a formula or macro that will do the following:

-----
If ('Corprate Sales Dec 2004'!C10) = Salesman's Initals ('Settings
Worksheet'!C3:C12) and their territory ('Settings Worksheet'!D3:D12) =
"NORTH" display "No." in cell B10. Below is my failed attempt:

=IF(AND(C10='Settings Worksheet'!C3:C12,'Settings
Worksheet'!D3:D12="NORTH"),"No."," ")

but all this does is give me an "#VALUE" error. I also tried

=IF(OR(C3='Settings Worksheet'!C4,AND('Settings
Worksheet'!D3="NORTH")),"No."," ")

but when added all the comparison just for the "NORTH Territory"

=IF(OR(C3='Settings Worksheet'!C3,'Settings Worksheet'!C4,'Settings
Worksheet'!C5,'Settings Worksheet'!C6,'Settings
Worksheet'!C7,'Settings Worksheet'!C8,'Settings
Worksheet'!C9,'Settings Worksheet'!C10),AND('Settings
Worksheet'!D3="NORTH",'Settings Worksheet'!D4="NORTH",'Settings
Worksheet'!D5="NORTH",'Settings Worksheet'!D6="NORTH",'Settings
Worksheet'!D7="NORTH",'Settings Worksheet'!D8="NORTH",'Settings
Worksheet'!D9="NORTH",'Settings Worksheet'!D10="NORTH"),"No."," ")
-----

it does not work and I cannot figure out how or why. Any / all
assistance will be greatly appreciated.

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default displaying text based on "TRUE" result from data comparison

You refer to cells but to what properties to you want to compare the value
of?

try this: If 'Settings Worksheet'!D4.value="NORTH"
or
If ('Settings Worksheet'!D4.value="NORTH") = True AND ('Settings
Worksheet'!D6.value ="NORTH") = True then ...
' If 1 AND 1 Then True
' else 1 AND 0, 0 AND 1, 0 AND 0, all these = 0 = False

--

Hope that helps,

Phil

------------------------------------------

IT Analyst
SE1, London, UK,

http://uk.geocities.com/philippeoget
philippeoget at yahoo dot com

Programming Excel: <a
href="http://uk.geocities.com/philippeoget/xl/InternetLinkOrganiser.zip"
target="_blank"The Excel A2Z Project: </a
http://uk.geocities.com/philippeoget/a2z/

"WebWizard97" wrote in message
...
hello all,

I have a workbook which I use to keep track of our sales for the month
/ year. I have tried to automate various pieces on each worksheet
(Jan - Dec) to eliminate manual data entry. I wrote the following to
display which territoy (North or South) the sale was made in based on
the salesman's initials:

----- TAKEN FROM CELL 10
=IF(OR(C10="AM",C10="BP",C10="JS",C10="SW",C10="WB "),"No.",
IF(OR(C10="JD",C10="KO",C10="PD",C10="SP"),"So."," "))
-----

however, I need to manually update this on each worksheet everytime a
salesman is hired, leaves, and/or moves to a new territory. I want to
develope a formula or macro that will do the following:

-----
If ('Corprate Sales Dec 2004'!C10) = Salesman's Initals ('Settings
Worksheet'!C3:C12) and their territory ('Settings Worksheet'!D3:D12) =
"NORTH" display "No." in cell B10. Below is my failed attempt:

=IF(AND(C10='Settings Worksheet'!C3:C12,'Settings
Worksheet'!D3:D12="NORTH"),"No."," ")

but all this does is give me an "#VALUE" error. I also tried

=IF(OR(C3='Settings Worksheet'!C4,AND('Settings
Worksheet'!D3="NORTH")),"No."," ")

but when added all the comparison just for the "NORTH Territory"

=IF(OR(C3='Settings Worksheet'!C3,'Settings Worksheet'!C4,'Settings
Worksheet'!C5,'Settings Worksheet'!C6,'Settings
Worksheet'!C7,'Settings Worksheet'!C8,'Settings
Worksheet'!C9,'Settings Worksheet'!C10),AND('Settings
Worksheet'!D3="NORTH",'Settings Worksheet'!D4="NORTH",'Settings
Worksheet'!D5="NORTH",'Settings Worksheet'!D6="NORTH",'Settings
Worksheet'!D7="NORTH",'Settings Worksheet'!D8="NORTH",'Settings
Worksheet'!D9="NORTH",'Settings Worksheet'!D10="NORTH"),"No."," ")
-----

it does not work and I cannot figure out how or why. Any / all
assistance will be greatly appreciated.

Thank you in advance.



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
Disable autoformat of "true" and "false" text drs207 Excel Discussion (Misc queries) 6 April 14th 23 05:33 PM
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Vlookup, replace true text result with "X" Maxine Excel Worksheet Functions 5 June 25th 08 06:19 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 01:26 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"