LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default using IF function to copy, but leave populated cell alone

Here is what I ended up using in VBA

Dim TheCell As Range

For C = 1 To 100
Set TheCell = Cells(C, 2)
If IsEmpty(TheCell.Value) Then
TheCell.Value = TheCell.Offset(0, -1).Value
End If
Next C
End Sub

use a second loop if you want to continue to add the text to addition
cells


JMB wrote:
One other thing, you could enter the first IF statement I suggested in a
third column, then copy this third column, click Edit/Paste Special/Values
over your original data in column B.

Just be sure to back up before trying anything new.


" wrote:

Not exactly (thanks for the try)... that puts a blank where some test
was that I want to keep.

It would be more like =IF(A1="yes","yes", DO NOTHING)

where do nothing means leave that cell alone!

Befo
A B
1 example text (blank)
2 BlahBla goodstuff
3 example text (blank)

After:
A B
1 example text example text
2 BlahBla goodstuff
3 example text example text



 
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
disabling the copy paste function in a cell sam Excel Worksheet Functions 0 February 22nd 06 02:10 PM
how to count the number of text frequencies and copy to other cell DG Excel Worksheet Functions 1 October 6th 05 07:11 PM
What worksheet function will formatlessly copy cell contents? MargueriteL Excel Worksheet Functions 1 June 7th 05 04:16 AM
Function syntax to compare cell contents ES Excel Worksheet Functions 2 May 18th 05 03:53 PM
copy a cell value not its function KC Mao Excel Discussion (Misc queries) 2 December 4th 04 04:30 AM


All times are GMT +1. The time now is 11:25 PM.

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"