ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Fill cells if adjacent cell match criteria (https://www.excelbanter.com/excel-discussion-misc-queries/91716-fill-cells-if-adjacent-cell-match-criteria.html)

Jess

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

Peo Sjoblom

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




Marcelo

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


Marcelo

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


CWillis

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


Erin

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


Jess

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



All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com