close
I am using Excel to keep track of monthly inventory and I need to
input stock on daily basis. Column A has a 6 didget stock numbers
approx. 300 items and I have an in amp; out column for each day of the
month. I need to remain in one column while I find the stock no.
according to the day.

Ex.

#112233 input 2 to day March 7

#112233 being Column A98, March 7 being column Q entered into Q98 in 2
pcs.

Stock no. #2666 A56 entered to Q56. Each time I enter a stock no. the
highlited cell will remain in column Q until request to change day of
month.

Need macro to enter date, another to find stock cell.

Currently using macro below but offset would not be used because
offset continuously changes daily.

Sub Macro1()
Dim ans
Dim cell As Range
ans = InputBox(quot;Enter Stock numberquot;)
If ans lt;gt; False Then
Set cell = Cells.Find(What:=ans, _
After:=Range(quot;A1quot;), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)
If Not cell Is Nothing Then
cell.Offset(0, 4).Select
End If
End If
End SubThanks,
Rube

Try something like:

If Not cell Is Nothing Then
cell.Offset(0, Day(Date) 1).Select

This will offset 15 columns to the riht (14/03/2006)

HTH
--
AP

quot;Rubixquot; gt; a écrit dans le message de
...
gt; I am using Excel to keep track of monthly inventory and I need to
gt; input stock on daily basis. Column A has a 6 didget stock numbers
gt; approx. 300 items and I have an in amp; out column for each day of the
gt; month. I need to remain in one column while I find the stock no.
gt; according to the day.
gt;
gt; Ex.
gt;
gt; #112233 input 2 to day March 7
gt;
gt; #112233 being Column A98, March 7 being column Q entered into Q98 in 2
gt; pcs.
gt;
gt; Stock no. #2666 A56 entered to Q56. Each time I enter a stock no. the
gt; highlited cell will remain in column Q until request to change day of
gt; month.
gt;
gt; Need macro to enter date, another to find stock cell.
gt;
gt; Currently using macro below but offset would not be used because
gt; offset continuously changes daily.
gt;
gt; Sub Macro1()
gt; Dim ans
gt; Dim cell As Range
gt; ans = InputBox(quot;Enter Stock numberquot;)
gt; If ans lt;gt; False Then
gt; Set cell = Cells.Find(What:=ans, _
gt; After:=Range(quot;A1quot;), _
gt; LookIn:=xlFormulas, _
gt; LookAt:=xlWhole, _
gt; SearchOrder:=xlByRows, _
gt; SearchDirection:=xlNext, _
gt; MatchCase:=False, _
gt; SearchFormat:=False)
gt; If Not cell Is Nothing Then
gt; cell.Offset(0, 4).Select
gt; End If
gt; End If
gt; End Sub
gt;
gt;
gt; Thanks,
gt; Rube
Thanks for your response Ardus. Sorry I did not mention, inventory is
not entered on a daily basis. I previously used Lotus. Looking to do
the same here if possible. One function selected the day of the month
and remained in the column until change of day. The other function
found the stock item number and inventory was entered that way.

RubeOn Tue, 14 Mar 2006 10:34:02 0100, quot;Ardus Petusquot;
gt; wrote:

gt;Try something like:
gt;
gt; If Not cell Is Nothing Then
gt; cell.Offset(0, Day(Date) 1).Select
gt;
gt;This will offset 15 columns to the riht (14/03/2006)
gt;
gt;HTH
arrow
arrow
    全站熱搜

    software 發表在 痞客邦 留言(0) 人氣()