Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Variable name question
I have some code as follows - how do I name the idate in the if statement?
In the case below I was trying to make sure that it would be 5/7/2009 on both sides (A20 = 5/7/2009) so the if statement should work it does not read ("idate" & i) as = to idate7 - so how can I get the right side of the if statement to come up with idate7, or idate8, etc? I will use the For Next statement to get the i value (1 to 31) to change. Is it not the ("idate"& i) that is wrong even trying ("idate" & "7") does not work but I don't know what i am missing. Set idate7 = ActiveSheet.Cells(20, 1) Dim i As Integer Let i = 7 If datecurrent = ("idate" & i) Then |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
two-variable data table question | Excel Discussion (Misc queries) | |||
variable question | Excel Discussion (Misc queries) | |||
Sum cells based on a row variable and seperate column variable | Excel Worksheet Functions | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
I Need VBA Assistance for global variable question | Excel Discussion (Misc queries) |