Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 18
Default help with if statement

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,624
Default help with if statement

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 18
Default help with if statement

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If / Or statement Annabelle Excel Discussion (Misc queries) 5 February 21st 06 11:22 AM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"