Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I fill (copy) nonadjacent cells to adjacent cells? | Excel Discussion (Misc queries) | |||
checking that cells have a value before the workbook will close | Excel Worksheet Functions | |||
Auto fill multiple cells depending on single cell value | Excel Worksheet Functions | |||
I want to format a cell based on an adjacent cells value | Excel Discussion (Misc queries) | |||
Identifying the Active Fill Color | Excel Discussion (Misc queries) |