LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default How to know if a text is displayed on an empty cell

Hi !
I have a text in cells(1,1) that go on cells(1,2) and cells(1,3) Is there a
function that allow me to count how many columns are used by cells(1,1).
I could do something like:

Dim UsedCol as Interger
If(Cells(1,1)< "")
UsedCol = 1
If(Cells(1,2)= "" And "Text go on the cells") Then
UsedCol = UsedCol + 1
If(Cells(1,3)= "" And "Text go on the cells") Then
UsedCol = UsedCol + 1
End If
End If
Msgbox("Number of column used: " & UsedCol)
End If

Thank you.
--
Alex St-Pierre
 
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
empty columns not to be displayed Nikhil Charts and Charting in Excel 1 July 3rd 09 05:41 PM
Text displayed as # in cell Tamm Excel Discussion (Misc queries) 2 June 21st 09 11:09 PM
Only Part Of Text Displayed In Cell UT Excel Discussion (Misc queries) 2 February 9th 09 03:55 AM
How do I add a text box to a cell that is displayed on a click? Normanchi Excel Discussion (Misc queries) 1 September 18th 08 05:23 PM
Text wider than one cell is not displayed in the next empty cell Len Pace Excel Discussion (Misc queries) 5 February 18th 05 12:24 AM


All times are GMT +1. The time now is 04:45 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"