#1   Report Post  
Junior Member
 
Posts: 2
Default Excel functions

I want to use the following IF ... THEN.

If any cell in column D contains x then put y in the same row in column G
and
If any cell in column D contains a then put b in the same row in column H

Can this be done?
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Matthew Williamson View Post
I want to use the following IF ... THEN.

If any cell in column D contains x then put y in the same row in column G
and
If any cell in column D contains a then put b in the same row in column H

Can this be done?
It would involve a formula in G and one in H.

In G1 put =IF(D1="X","Y","") and in H1 put =IF(D1="A","B","")then copy both formulas down as needed.
  #3   Report Post  
Junior Member
 
Posts: 2
Default

Thank you. I had hoped there would be one instruction to analyse the column.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,522
Default Excel functions

On Monday, April 9, 2012 7:25:39 AM UTC-5, Matthew Williamson wrote:
I want to use the following IF ... THEN.

If any cell in column D contains x then put y in the same row in column
G
and
If any cell in column D contains a then put b in the same row in column
H

Can this be done?




--
Matthew Williamson


Or use a worksheet_change event macro to make it automatic without any formulas. Right click sheet tabview codeinsert

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Or Target.Column < 4 Then Exit Sub
If UCase(Target) = "X" Then Target.Offset(, 3) = "Y"
If UCase(Target) = "A" Then Target.Offset(, 4) = "B"
End Sub
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
Any way to use "standard" Excel functions inside VBA functions Nenad Tosic Excel Programming 4 May 7th 10 09:11 PM
How to convert cell formula functions to code functions Adnan Excel Discussion (Misc queries) 1 October 1st 08 08:30 PM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Conversion from Spreadsheet Toolkit functions (ESSV....) to EssBase API functions sujay Excel Programming 0 June 5th 06 10:13 AM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM


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