Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jess
 
Posts: n/a
Default Fill cells if adjacent cell match criteria

I have a large worksheet and hate to use the fill down for this.

Here's my scenario:

In column A there are different values. Examples: ADJ, REFUND, TUI, STE,
BKS, etc.
In column B, I need there to be an A or an E depending on which value is in
column A. So, if ADJ, TUI or STE are in column A, an A would go in column B.
If the value in Column A is REFUND or BKS, then E would go in Column B.

Any suggestions on how to make this work?

Thanks!
--
Jess
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Fill cells if adjacent cell match criteria

One way

=IF(OR(A1={"ADJ";"TUI";"STE"}),"A",IF(OR(A1={"REFU ND";"BKS"}),"E",""))

assuming they start in A1, copy down as long as needed

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"Jess" wrote in message
...
I have a large worksheet and hate to use the fill down for this.

Here's my scenario:

In column A there are different values. Examples: ADJ, REFUND, TUI, STE,
BKS, etc.
In column B, I need there to be an A or an E depending on which value is
in
column A. So, if ADJ, TUI or STE are in column A, an A would go in column
B.
If the value in Column A is REFUND or BKS, then E would go in Column B.

Any suggestions on how to make this work?

Thanks!
--
Jess



  #3   Report Post  
Posted to microsoft.public.excel.misc
Marcelo
 
Posts: n/a
Default Fill cells if adjacent cell match criteria

Jesss

try yo use

=if(or((a:A="refund"),(a:a="bks"));"E";"A")

regards from Brazil
Marcelo

"Jess" escreveu:

I have a large worksheet and hate to use the fill down for this.

Here's my scenario:

In column A there are different values. Examples: ADJ, REFUND, TUI, STE,
BKS, etc.
In column B, I need there to be an A or an E depending on which value is in
column A. So, if ADJ, TUI or STE are in column A, an A would go in column B.
If the value in Column A is REFUND or BKS, then E would go in Column B.

Any suggestions on how to make this work?

Thanks!
--
Jess

  #4   Report Post  
Posted to microsoft.public.excel.misc
Marcelo
 
Posts: n/a
Default Fill cells if adjacent cell match criteria

Jess,

try

IF(OR((A:A="REFUND"),(A:A="BKS")),"E","A")

Regards from Brazil
Marcelo

"Jess" escreveu:

I have a large worksheet and hate to use the fill down for this.

Here's my scenario:

In column A there are different values. Examples: ADJ, REFUND, TUI, STE,
BKS, etc.
In column B, I need there to be an A or an E depending on which value is in
column A. So, if ADJ, TUI or STE are in column A, an A would go in column B.
If the value in Column A is REFUND or BKS, then E would go in Column B.

Any suggestions on how to make this work?

Thanks!
--
Jess

  #5   Report Post  
Posted to microsoft.public.excel.misc
CWillis
 
Posts: n/a
Default Fill cells if adjacent cell match criteria

This may help:

Sub testing()
Dim rowassignment
Dim numberofrows

numberofrows = 6

For rowassignment = 1 To numberofrows
For x = 1 To 5
If Cells(rowassignment, 1).Value = "ADJ" Then
Cells(rowassignment, 2).Value = "A"
Else: Cells(rowassignment, 2).Value = "E"
End If
Next x
Next rowassignment
End Sub

I don't know how to make it check for more than one value (i.e. "ADJ") so
unless someone else can help, you will have to copy and paste the above,
changing what it is checking for each time in the macro. Hope this helps.

"Jess" wrote:

I have a large worksheet and hate to use the fill down for this.

Here's my scenario:

In column A there are different values. Examples: ADJ, REFUND, TUI, STE,
BKS, etc.
In column B, I need there to be an A or an E depending on which value is in
column A. So, if ADJ, TUI or STE are in column A, an A would go in column B.
If the value in Column A is REFUND or BKS, then E would go in Column B.

Any suggestions on how to make this work?

Thanks!
--
Jess



  #6   Report Post  
Posted to microsoft.public.excel.misc
Erin
 
Posts: n/a
Default Fill cells if adjacent cell match criteria

=IF(OR(A1="ADJ", A1="TUI", A1="STE"),"A",IF(OR(A1="REFUND", A1="BKS"),"E",""))

I hope this helps.

Erin


"Jess" wrote:

I have a large worksheet and hate to use the fill down for this.

Here's my scenario:

In column A there are different values. Examples: ADJ, REFUND, TUI, STE,
BKS, etc.
In column B, I need there to be an A or an E depending on which value is in
column A. So, if ADJ, TUI or STE are in column A, an A would go in column B.
If the value in Column A is REFUND or BKS, then E would go in Column B.

Any suggestions on how to make this work?

Thanks!
--
Jess

  #7   Report Post  
Posted to microsoft.public.excel.misc
Jess
 
Posts: n/a
Default Fill cells if adjacent cell match criteria

Believe it or not, I found the answer to my own question in the Microsoft
Assistance pages. The answer was written by Ashish Mathur, a Microsoft MVP
(Most Valuable Professional) and can be found here
http://office.microsoft.com/en-us/as...549021033.aspx. This is
what I was trying to do but didn't understand all the values in the little
formula.

thanks!
--
Jess


"Jess" wrote:

I have a large worksheet and hate to use the fill down for this.

Here's my scenario:

In column A there are different values. Examples: ADJ, REFUND, TUI, STE,
BKS, etc.
In column B, I need there to be an A or an E depending on which value is in
column A. So, if ADJ, TUI or STE are in column A, an A would go in column B.
If the value in Column A is REFUND or BKS, then E would go in Column B.

Any suggestions on how to make this work?

Thanks!
--
Jess

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
How do I fill (copy) nonadjacent cells to adjacent cells? BuckyGeorge Excel Discussion (Misc queries) 2 December 22nd 05 04:18 AM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Auto fill multiple cells depending on single cell value henrat Excel Worksheet Functions 2 November 28th 05 04:59 AM
I want to format a cell based on an adjacent cells value Cumbo Excel Discussion (Misc queries) 1 December 13th 04 11:52 AM
Identifying the Active Fill Color Steve Conary Excel Discussion (Misc queries) 3 December 9th 04 04:45 AM


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