LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default insert two text values

Elseif Counter 6 then
Cells(x,y).Value = "ENG"


should have been

Elseif Counter 6 then
Cells(x,y).Value = "TEST"

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
Possibly

If .Cells(x, skilly).Value = "x" And did = False Then
For y = timeStart To timeStart + 7
If .Cells(x, y).Value = "." _
And counter <= 6 _
And need 0 Then
Cells(x, y).Value = "ENG"
Elseif Counter 6 then
Cells(x,y).Value = "ENG"
End if
counter = counter + 1
need = need - 1
End If
Next y
End If

However, if you will always fill in 8 cells then this might be easier:

If .Cells(x, skilly).Value = "x" And did = False and Need 0 and _
.Cells(x,TimeStart) = "." Then
.Cells(x,TimeStart).Resize(1,8).Value = _
Array("ENG","ENG","ENG","ENG","ENG","ENG","TEST"," TEST")
End if



--
Regards,
Tom Ogilvy

"hotherps " wrote in message
...
I have the following code that works well:

If .Cells(x, skilly).Value = "x" And did = False Then
For y = timeStart To timeStart + 7
If .Cells(x, y).Value = "." _
And counter < 6 _
And need 0 Then
Cells(x, y).Value = "ENG"
counter = counter + 1
need = need - 1
End If
Next y
End If

What I want to is insert a text value "Test" into cells 7 and 8.
You can see the counter stops placing the value after 6 times I want to
fill in the next 2 cells after that with a fixed string value.The result
would look like:

Eng Eng Eng Eng Eng Eng Test Test

Thanks


---
Message posted from http://www.ExcelForum.com/





 
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
text box insert in Excel - text box lines print on second copy Diana (Berry & Co) Excel Discussion (Misc queries) 0 July 26th 06 04:39 AM
Need a macro to insert text in a cell that already has text.Excel go1angel Excel Discussion (Misc queries) 2 October 5th 05 10:32 PM
How to Insert function right on text values e.g. 0180001640 Norm Genest Excel Worksheet Functions 1 May 18th 05 05:51 PM
How to Insert function right on text values e.g. 0180001640 Gary Brown Excel Worksheet Functions 0 May 18th 05 05:26 PM
how do I insert a function that chooses between two text values? Gailwdz Excel Worksheet Functions 5 May 4th 05 07:36 AM


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