Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I need help on my if statement.
I am populating selected cells in a spreadsheet by use of a userform. The polulating works great. I would like to adjust my code so that if no value is selected from from the combobox then the target cell will retain its original value/formula. Any help would be great Here is what I have so far. If ComboBox_Sub.Value Is Nothing Then ????? Else Cells(r, 11) = ComboBox_Sub.Value End If Shane |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
One way:
If Combobox_Sub.Value < vbNullString Then _ Cells(r, 11) = Combobox_Sub.Value In article .com, Shane wrote: I need help on my if statement. I am populating selected cells in a spreadsheet by use of a userform. The polulating works great. I would like to adjust my code so that if no value is selected from from the combobox then the target cell will retain its original value/formula. Any help would be great Here is what I have so far. If ComboBox_Sub.Value Is Nothing Then ????? Else Cells(r, 11) = ComboBox_Sub.Value End If Shane |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
That worked, thanks
On Aug 20, 12:56 pm, JE McGimpsey wrote: One way: If Combobox_Sub.Value < vbNullString Then _ Cells(r, 11) = Combobox_Sub.Value In article .com, Shane wrote: I need help on my if statement. I am populating selected cells in a spreadsheet by use of a userform. The polulating works great. I would like to adjust my code so that if no value is selected from from the combobox then the target cell will retain its original value/formula. Any help would be great Here is what I have so far. If ComboBox_Sub.Value Is Nothing Then ????? Else Cells(r, 11) = ComboBox_Sub.Value End If Shane- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can an If statement answer an If statement? | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions | |||
If / Or statement | Excel Discussion (Misc queries) | |||
If statement and Isblank statement | Excel Worksheet Functions | |||
Help please, IF statement/SUMIF statement | Excel Worksheet Functions |