Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tel Tel is offline
external usenet poster
 
Posts: 39
Default Multiple condition if statement

Hi Guys,

I'm back!

I have an problem in that I want to calculate the following:

If Summary!D3 = 3 then NewSheet! A5 = Summary! R3
But
If Summary!D3 = 2 then NewSheet!A5 = Summary! S3
or
If Summary !D3 = 1 then NewSheet!A5 = Summary T3
else ""

In essence I want a formula or Macro that will display a result in a new
sheet which is dependent upon the value of cell D3.

This needs to be repeatable as I will have 18 times I will need to calculate
this (i.e D3, E3, F3 etc)

Thanks

Terry
  #2   Report Post  
Posted to microsoft.public.excel.misc
Tel Tel is offline
external usenet poster
 
Posts: 39
Default Multiple condition if statement

I've found the answer:

For the benefit of others here it is:

=IF($D$3=AG2,AG3,(IF($D$3=AH2,AH3,(IF($D$3=AI2,AI3 ,(IF($D$3=AJ2,"")))))))

Now all I need is help to write a macro that will copy all the text in Cells
AD1:AD34 and paste it as values into column C of a new workbook then remove
the blank lines in the new workbook and saving it with a specific filename
sourced from 2 cells in the current workbook.

"Tel" wrote:

Hi Guys,

I'm back!

I have an problem in that I want to calculate the following:

If Summary!D3 = 3 then NewSheet! A5 = Summary! R3
But
If Summary!D3 = 2 then NewSheet!A5 = Summary! S3
or
If Summary !D3 = 1 then NewSheet!A5 = Summary T3
else ""

In essence I want a formula or Macro that will display a result in a new
sheet which is dependent upon the value of cell D3.

This needs to be repeatable as I will have 18 times I will need to calculate
this (i.e D3, E3, F3 etc)

Thanks

Terry

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Multiple condition if statement

What happens if d3 doesn't equal any of the cells listed? With your formula,
you will get FALSE returned. Perhaps you want (extraneous parentheses also
removed):
=IF($D$3=AG2,AG3,IF($D$3=AH2,AH3,IF($D$3=AI2,AI3,I F($D$3=AJ2,AJ3,""))))

Regards, Fred

"Tel" wrote in message
...
I've found the answer:

For the benefit of others here it is:

=IF($D$3=AG2,AG3,(IF($D$3=AH2,AH3,(IF($D$3=AI2,AI3 ,(IF($D$3=AJ2,"")))))))

Now all I need is help to write a macro that will copy all the text in
Cells
AD1:AD34 and paste it as values into column C of a new workbook then
remove
the blank lines in the new workbook and saving it with a specific filename
sourced from 2 cells in the current workbook.

"Tel" wrote:

Hi Guys,

I'm back!

I have an problem in that I want to calculate the following:

If Summary!D3 = 3 then NewSheet! A5 = Summary! R3
But
If Summary!D3 = 2 then NewSheet!A5 = Summary! S3
or
If Summary !D3 = 1 then NewSheet!A5 = Summary T3
else ""

In essence I want a formula or Macro that will display a result in a new
sheet which is dependent upon the value of cell D3.

This needs to be repeatable as I will have 18 times I will need to
calculate
this (i.e D3, E3, F3 etc)

Thanks

Terry


  #4   Report Post  
Posted to microsoft.public.excel.misc
Tel Tel is offline
external usenet poster
 
Posts: 39
Default Multiple condition if statement

Hi Fred,

Many thanks for your response. to be honest I was pretty damn pleased with
myself that I'd worked it out this far.

To be honest the user has no control over the content of D3 so it shouldn't
be an issue. However, in the interests of completeness I take your comment
on board, could you advise which set of parentheses are extraneous please.

Many thanks

Tel

"Fred Smith" wrote:

What happens if d3 doesn't equal any of the cells listed? With your formula,
you will get FALSE returned. Perhaps you want (extraneous parentheses also
removed):
=IF($D$3=AG2,AG3,IF($D$3=AH2,AH3,IF($D$3=AI2,AI3,I F($D$3=AJ2,AJ3,""))))

Regards, Fred

"Tel" wrote in message
...
I've found the answer:

For the benefit of others here it is:

=IF($D$3=AG2,AG3,(IF($D$3=AH2,AH3,(IF($D$3=AI2,AI3 ,(IF($D$3=AJ2,"")))))))

Now all I need is help to write a macro that will copy all the text in
Cells
AD1:AD34 and paste it as values into column C of a new workbook then
remove
the blank lines in the new workbook and saving it with a specific filename
sourced from 2 cells in the current workbook.

"Tel" wrote:

Hi Guys,

I'm back!

I have an problem in that I want to calculate the following:

If Summary!D3 = 3 then NewSheet! A5 = Summary! R3
But
If Summary!D3 = 2 then NewSheet!A5 = Summary! S3
or
If Summary !D3 = 1 then NewSheet!A5 = Summary T3
else ""

In essence I want a formula or Macro that will display a result in a new
sheet which is dependent upon the value of cell D3.

This needs to be repeatable as I will have 18 times I will need to
calculate
this (i.e D3, E3, F3 etc)

Thanks

Terry



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Multiple condition if statement

It's in my response. The formula I posted has the extraneous parentheses
removed.

Regards,
Fred.

"Tel" wrote in message
...
Hi Fred,

Many thanks for your response. to be honest I was pretty damn pleased
with
myself that I'd worked it out this far.

To be honest the user has no control over the content of D3 so it
shouldn't
be an issue. However, in the interests of completeness I take your
comment
on board, could you advise which set of parentheses are extraneous please.

Many thanks

Tel

"Fred Smith" wrote:

What happens if d3 doesn't equal any of the cells listed? With your
formula,
you will get FALSE returned. Perhaps you want (extraneous parentheses
also
removed):
=IF($D$3=AG2,AG3,IF($D$3=AH2,AH3,IF($D$3=AI2,AI3,I F($D$3=AJ2,AJ3,""))))

Regards, Fred

"Tel" wrote in message
...
I've found the answer:

For the benefit of others here it is:

=IF($D$3=AG2,AG3,(IF($D$3=AH2,AH3,(IF($D$3=AI2,AI3 ,(IF($D$3=AJ2,"")))))))

Now all I need is help to write a macro that will copy all the text in
Cells
AD1:AD34 and paste it as values into column C of a new workbook then
remove
the blank lines in the new workbook and saving it with a specific
filename
sourced from 2 cells in the current workbook.

"Tel" wrote:

Hi Guys,

I'm back!

I have an problem in that I want to calculate the following:

If Summary!D3 = 3 then NewSheet! A5 = Summary! R3
But
If Summary!D3 = 2 then NewSheet!A5 = Summary! S3
or
If Summary !D3 = 1 then NewSheet!A5 = Summary T3
else ""

In essence I want a formula or Macro that will display a result in a
new
sheet which is dependent upon the value of cell D3.

This needs to be repeatable as I will have 18 times I will need to
calculate
this (i.e D3, E3, F3 etc)

Thanks

Terry




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
IF statement...And condition Rich D Excel Discussion (Misc queries) 1 January 4th 08 04:50 PM
lookup with multiple condition, but one condition to satisfy is en Eddy Stan Excel Worksheet Functions 2 October 27th 07 02:06 PM
3 logical condition if statement Mikehughes Excel Worksheet Functions 3 July 19th 06 01:59 PM
Blanks as a condition of a statement Stuck on Blanks New Users to Excel 2 November 23rd 05 01:24 AM
Condition Statement Django Excel Discussion (Misc queries) 5 August 26th 05 06:59 PM


All times are GMT +1. The time now is 01:59 AM.

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"