Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
use VB code IF to automate filling in 11 columns
I used belowed VB code IF to automate fill in 11 columns:
If Cells(p, "D").Value = DateValue("01/01/2005") Then a = Cells(p, "H").Value b = Cells(p, "A").Value ............ The first ten work pretty well, but the last one, 11 one fails. Is it the reason that IF in VB only allows ten variance? Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
use VB code IF to automate filling in 11 columns
Use a Select Case statement instead (Psuedo code)
Select Case Cells(p, "D").Value Case Is = 'Conditions here 'More Case Statements Case Else End Select -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "smart.daisy" wrote in message ... I used belowed VB code IF to automate fill in 11 columns: If Cells(p, "D").Value = DateValue("01/01/2005") Then a = Cells(p, "H").Value b = Cells(p, "A").Value ............ The first ten work pretty well, but the last one, 11 one fails. Is it the reason that IF in VB only allows ten variance? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
code not unique find latest date | Excel Discussion (Misc queries) | |||
Conform a total to a list of results? | Excel Discussion (Misc queries) | |||
Macro for changing text to Proper Case | Excel Worksheet Functions | |||
Using other workbooks.. | Excel Worksheet Functions | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions |