So Close Yet So Far!!!!!

  • Thread starter Thread starter n0 h4ck1ng
  • Start date Start date
N

n0 h4ck1ng

hope this make sense and someone can HELP!


ok so ive gotten the information ineed to go from one sheet to the
other in the cells it needs to go and ive been given a simple code to
make cells that i select constant.

My problem is that it would take to long to go throught the sheet and
select all these cells that i need changed to constants.

heres the scenario: in col A i have dates for a 28 day
month(a2=8/15/05, a4=8/16/05, a6=8/17/05 etcic col Bi have a product
name(beef), info in this col is collected fromfrom a cell on anouther
sheet that changes daily and inputed under the correct date. Follow so
far? cols c and d do calcs based on those #'sthan it starts over in col
e(chicken) f an g, so on and so on. so for a spacfic day, lets say
8/15/05 info would go from one sheet to this date sheet in cells a2,
e2, h2,k2,and n2, each one being the qty of a different item, this
hapens in about 100 cells throughout the sheet. Than tomarrow i count
again and the #'s got to the correct date ie a3, e3, h3, k3.

what i need is a code that will select a2, e2 h2 k2 etc and make them
constant when i hit the button than the next day it will select
a3,e3,h3,k3 anddo the same

thank you in advance

Leon
 
Sounds like you need a macro to review each value in column A and if the date
is less than now it should convert that row to constants. This could be done
with a button or worksheet event.

Int(now()) will provide the integer date code for the today (based on your
pc clock)

dim c as range
for each c in activesheet.columns(1)
if c.value < Int(now()) then
.......your code here
end if
next
 
hope this make sense and someone can HELP!


ok so ive gotten the information ineed to go from one sheet to the
other in the cells it needs to go and ive been given a simple code to
make cells that i select constant.

My problem is that it would take to long to go throught the sheet and
select all these cells that i need changed to constants.

heres the scenario: in col A i have dates for a 28 day
month(a2=8/15/05, a4=8/16/05, a6=8/17/05 etcic col Bi have a product
name(beef), info in this col is collected fromfrom a cell on anouther
sheet that changes daily and inputed under the correct date. Follow so
far? cols c and d do calcs based on those #'sthan it starts over in col
e(chicken) f an g, so on and so on. so for a spacfic day, lets say
8/15/05 info would go from one sheet to this date sheet in cells a2,
e2, h2,k2,and n2, each one being the qty of a different item, this
hapens in about 100 cells throughout the sheet. Than tomarrow i count
again and the #'s got to the correct date ie a3, e3, h3, k3.

what i need is a code that will select a2, e2 h2 k2 etc and make them
constant when i hit the button than the next day it will select
a3,e3,h3,k3 anddo the same

thank you in advance

If I'm reading you right, this should work. It'll ask which row you
want made values, and then operate on that row. Just copy and change
the letters as needed for additional coulmns h,k, etc.


Sub test()

Dim RowNum As Integer

RowNum = InputBox("What row are you doing?")


Range("A" & RowNum).Copy
Range("A" & RowNum).PasteSpecial Paste:=xlValues, Transpose:=False

Range("E" & RowNum).Copy
Range("E" & RowNum).PasteSpecial Paste:=xlValues, Transpose:=False

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top