Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 2 columns in my worksheet:
Column A Column B 10 TRUE 0 FALSE 4 TRUE 0 FALSE 2 TRUE For every FALSE in column B, I would like column A to be -997. Thanks in advace for the code. DaveB |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A number of ways to do this. How about filtering on False in column B
and then enter -997 in all the found rows On Thu, 23 Oct 2003 07:48:45 -0700, "DaveB" wrote: I have 2 columns in my worksheet: Column A Column B 10 TRUE 0 FALSE 4 TRUE 0 FALSE 2 TRUE For every FALSE in column B, I would like column A to be -997. Thanks in advace for the code. DaveB |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way
for each c in [b2:b200] if ucase(c)="FALSE" then c.offset(,-1).value=-997 next "DaveB" wrote in message ... I have 2 columns in my worksheet: Column A Column B 10 TRUE 0 FALSE 4 TRUE 0 FALSE 2 TRUE For every FALSE in column B, I would like column A to be -997. Thanks in advace for the code. DaveB |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave,
Sub Falser() Dim lrow As Long, x As Long ' determine number of rows lrow = Cells(Rows.Count, "A").End(xlUp).Row ' loop and replace For x = 1 To lrow If LCase(Cells(x, 2)) = "false" Then Cells(x, 1) = -997 End If Next End Sub -- sb "DaveB" wrote in message ... I have 2 columns in my worksheet: Column A Column B 10 TRUE 0 FALSE 4 TRUE 0 FALSE 2 TRUE For every FALSE in column B, I would like column A to be -997. Thanks in advace for the code. DaveB |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofill column from data (code) in column next to it | Excel Worksheet Functions | |||
Code for dragging the last column | Excel Worksheet Functions | |||
Why the column code in my excel is 123... instead of ABC...? | Excel Discussion (Misc queries) | |||
Create Code Based on Column | Excel Discussion (Misc queries) | |||
Code to save info to another column? | Excel Discussion (Misc queries) |