I'm new to this. I need to drop a value into a cell where there is nothing.
The 'target' cell should not have a formula because some days I would need
to place a one time value there , doing so would wipe out the formula.
Example:
A1 B1 C1
BOB JOE =IF(A1=quot;bobquot;,A2=B1)
A2
(BLANK)I need the blank cell (A2) to take the value of B1 if C1 is true.
Maybe I have the syntax wrong, maybe it's not possible. Let me know.
Thanks
In C1, enter
=A1=quot;bobquot;
In A2, enter
=IF(C1, B1, quot;quot;)
or leave C1 empty and enter in A2
=IF(A1=quot;bobquot;, B1, quot;quot;)
You cannot write a function in cell C1 that will place a value in A2.
Functions return values, they don't manipulate other objects (at least not
when called from a worksheet).quot; wrote:
gt; I'm new to this. I need to drop a value into a cell where there is nothing.
gt; The 'target' cell should not have a formula because some days I would need
gt; to place a one time value there , doing so would wipe out the formula.
gt;
gt; Example:
gt;
gt; A1 B1 C1
gt; BOB JOE =IF(A1=quot;bobquot;,A2=B1)
gt;
gt; A2
gt; (BLANK)
gt;
gt;
gt; I need the blank cell (A2) to take the value of B1 if C1 is true.
gt; Maybe I have the syntax wrong, maybe it's not possible. Let me know.
gt;
gt; Thanks
gt;
gt;
gt;
gt;
Hi
This may get you started:
Right-click on the sheet tab and select View Code.
Paste this code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target lt;gt; Range(quot;A1quot;) Then Exit Sub
If Range(quot;A1quot;).Value = quot;bobquot; Then
Range(quot;A2quot;).Value = Range(quot;B1quot;).Value
End If
End Sub
The code only runs if cell A1 has been changed and only checks to see
if quot;bobquot; has been entered in that cell, if it has then if copies the
data in B1 to A2.
Regards
Steve
- Jun 22 Fri 2007 20:38
if.... Anyway around this?
close
全站熱搜
留言列表
發表留言