Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Working an If formula

I have 4 columns that I am concerned with. Say F6 is a fixed number, column
G & H are Yes and No columns. Column I6 could change. I want my formula to
see if there is an X in G6. If there is, then I want I6 to equal F6. If the
X is in H6 I want a manual figure to be put in. How do I make this formula
work? Please help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default Working an If formula

Are you looking for a manual input and a formula at the same cell? if you
entre an manual input you will lose the formula, I suggest you to use an
auxilar column j for instance to enter the manual data that you want on I if
the X is on H column.

so the formula on I6 in this case should be:

=IF(G6="X",F6,IF(H6="X",J6))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Daleen" escreveu:

I have 4 columns that I am concerned with. Say F6 is a fixed number, column
G & H are Yes and No columns. Column I6 could change. I want my formula to
see if there is an X in G6. If there is, then I want I6 to equal F6. If the
X is in H6 I want a manual figure to be put in. How do I make this formula
work? Please help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default Working an If formula

A cell may either contain a formula or a value, but not both at the same
time. When your user types in a manual input, the formula is going to be
deleted.

About the only way you could deal with this is to use one more cell in the
process to accept that additional input to be used when there is an X in H6.
Lets say this new entry is in column I and your final result now moves to
column J.

Your formula in J6 might look something like this:
=IF(G6="X",F6,I6)
We don't need to specifically test for H6 = "X" if we can reasonably expect
that if "YES" hasn't been chosen that "NO" must have been.


"Daleen" wrote:

I have 4 columns that I am concerned with. Say F6 is a fixed number, column
G & H are Yes and No columns. Column I6 could change. I want my formula to
see if there is an X in G6. If there is, then I want I6 to equal F6. If the
X is in H6 I want a manual figure to be put in. How do I make this formula
work? Please help.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 411
Default Working an If formula

I had this twist:

=IF(G6="x",F6,IF(AND(H6="x",ISBLANK(J6)),"Enter the manual value in
j6",J6))
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default Working an If formula

It's not a bad idea at all.

"dan dungan" wrote:

I had this twist:

=IF(G6="x",F6,IF(AND(H6="x",ISBLANK(J6)),"Enter the manual value in
j6",J6))



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Working an If formula

And another twist..............

You could use event code and not bother with any formulas or an extra
column.

This seems to do the job.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False

If Target.Cells.Column = 7 Then '7 is G
n = Target.Row
If UCase(Target.Value) = "X" Then
Range("I" & n).Value = Range("F" & n).Value
End If
End If
If Target.Cells.Column = 8 Then '8 is H
n = Target.Row
If UCase(Target.Value) = "X" Then
Range("I" & n).Value = InputBox("enter a number")
End If
End If

enditall:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP

On Thu, 28 Aug 2008 14:47:27 -0700 (PDT), dan dungan
wrote:

I had this twist:

=IF(G6="x",F6,IF(AND(H6="x",ISBLANK(J6)),"Enter the manual value in
j6",J6))


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Working an If formula

Thanks so much. I just needed that last line of tweaking!! I can't tell you
how much this helps.

"Marcelo" wrote:

Are you looking for a manual input and a formula at the same cell? if you
entre an manual input you will lose the formula, I suggest you to use an
auxilar column j for instance to enter the manual data that you want on I if
the X is on H column.

so the formula on I6 in this case should be:

=IF(G6="X",F6,IF(H6="X",J6))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Daleen" escreveu:

I have 4 columns that I am concerned with. Say F6 is a fixed number, column
G & H are Yes and No columns. Column I6 could change. I want my formula to
see if there is an X in G6. If there is, then I want I6 to equal F6. If the
X is in H6 I want a manual figure to be put in. How do I make this formula
work? Please help.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Working an If formula

You all are fantastic. I have good knowledge of the basic math functions,
but get lost in the IF and SUMIF. Your help on both answers was greatly
appreciate.

"JLatham" wrote:

A cell may either contain a formula or a value, but not both at the same
time. When your user types in a manual input, the formula is going to be
deleted.

About the only way you could deal with this is to use one more cell in the
process to accept that additional input to be used when there is an X in H6.
Lets say this new entry is in column I and your final result now moves to
column J.

Your formula in J6 might look something like this:
=IF(G6="X",F6,I6)
We don't need to specifically test for H6 = "X" if we can reasonably expect
that if "YES" hasn't been chosen that "NO" must have been.


"Daleen" wrote:

I have 4 columns that I am concerned with. Say F6 is a fixed number, column
G & H are Yes and No columns. Column I6 could change. I want my formula to
see if there is an X in G6. If there is, then I want I6 to equal F6. If the
X is in H6 I want a manual figure to be put in. How do I make this formula
work? Please help.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Working an If formula

Can't thank you enough for the input. I have two scenerios now and will see
which works best. Thank you for the great help.

"dan dungan" wrote:

I had this twist:

=IF(G6="x",F6,IF(AND(H6="x",ISBLANK(J6)),"Enter the manual value in
j6",J6))

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Working an If formula

You gave me another option also. Maybe more than I can handle, but trust me
I am going to try and see which works best for my boss and me. Thanks so
much.

"Gord Dibben" wrote:

And another twist..............

You could use event code and not bother with any formulas or an extra
column.

This seems to do the job.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False

If Target.Cells.Column = 7 Then '7 is G
n = Target.Row
If UCase(Target.Value) = "X" Then
Range("I" & n).Value = Range("F" & n).Value
End If
End If
If Target.Cells.Column = 8 Then '8 is H
n = Target.Row
If UCase(Target.Value) = "X" Then
Range("I" & n).Value = InputBox("enter a number")
End If
End If

enditall:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP

On Thu, 28 Aug 2008 14:47:27 -0700 (PDT), dan dungan
wrote:

I had this twist:

=IF(G6="x",F6,IF(AND(H6="x",ISBLANK(J6)),"Enter the manual value in
j6",J6))



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 Formula Not Working novice Excel Worksheet Functions 4 July 31st 08 11:54 PM
Again for Formula that isn't working... jeannie v Excel Worksheet Functions 0 March 6th 08 01:41 AM
Formula Sometimes Working Sometimes Not merry_fay Excel Discussion (Misc queries) 4 December 6th 06 03:36 PM
Formula not working Anders Axson Excel Discussion (Misc queries) 1 May 3rd 06 08:25 PM
formula is not working olivia824 Excel Worksheet Functions 2 January 3rd 06 08:03 PM


All times are GMT +1. The time now is 08:19 PM.

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

About Us

"It's about Microsoft Excel"