Hi everybody. I'm an Italian VBA user and I'm tring to create a macro in excel. The problem is: I'd like to insert a formula (=IF(WEEKDAY(....)=....)) in a flexible number of non continuos cells which show dates. The formula in each cell refers to the previous one, except for the first, filled manually. So, for explample, I have 64 days and 35 numeric data per day, and I want it (the macro) to put 63 dates (the first is put by myself), each of them separated from the preceding one by 35 cells. 64 and 35 may change.
I don't know how to compile the code for selecting the right cells and fill them with the formula. Here is my code:
Dim giorni, dati as Integer
giorni = Range("A1").Value 'giorni is the number of days
dati = Range("B1").Value 'dati is the number of data
For x=1 to giorni
Range("C1").select '"C3" is the starting date - filled manually
Range.("C" & dati*x).formula..........
I hope I've been clear. Sorry for my english.
Thanks.
I don't know how to compile the code for selecting the right cells and fill them with the formula. Here is my code:
Dim giorni, dati as Integer
giorni = Range("A1").Value 'giorni is the number of days
dati = Range("B1").Value 'dati is the number of data
For x=1 to giorni
Range("C1").select '"C3" is the starting date - filled manually
Range.("C" & dati*x).formula..........
I hope I've been clear. Sorry for my english.
Thanks.