Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dow Dow is offline
external usenet poster
 
Posts: 31
Default Corresponding Row Question.

I am having trouble finding what I am looking for. Hopefully someone
out there can assist. I suspect it is easier than I am making it.

My goal is to find the blank cells in a column and concatenate three
corresponding cells. The trouble I am having is making sure the
formula I use corresponds to the correct row.

I have written a macro to select the empty cells in Column A. I then
want to insert a formula similar to "=B1&C1&D1" but I need the row
number to corrospond to the row number of the Cell in column A.

If A1 is blank this formula works perfectly, it fills in the blanks
and it changes to B2, C2, D2, etc as needed. A1 will not always be
blank though. If A3 is the first blank cell it fills in the
information for B1, C1, and D1 and then fills down from there which
makes sense based on the formula, but this is not what I need it to
do.

If A1 is not the first empty cell what is the formula or VBA code to
use so Excel sees the cell and combines the corresponding cells from
B, C, and D?

I am sure I will feel like an idiot when I see it but for some reason
the solution is escaping me right now (too many late nights I am
sure). I have looked at row(), column(), address() and tried some
combining and such to get the results I want. It has not worked.

Thanks for everything.

Dow.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Corresponding Row Question.

Hi,

Try this

Sub Sistence()
For counter = 2 To 20
If Range("D" & counter) = "" Then
Range("D" & counter).Formula = "=A1&B1&c1"
End If
Next
End Sub

Mike

"Dow" wrote:

I am having trouble finding what I am looking for. Hopefully someone
out there can assist. I suspect it is easier than I am making it.

My goal is to find the blank cells in a column and concatenate three
corresponding cells. The trouble I am having is making sure the
formula I use corresponds to the correct row.

I have written a macro to select the empty cells in Column A. I then
want to insert a formula similar to "=B1&C1&D1" but I need the row
number to corrospond to the row number of the Cell in column A.

If A1 is blank this formula works perfectly, it fills in the blanks
and it changes to B2, C2, D2, etc as needed. A1 will not always be
blank though. If A3 is the first blank cell it fills in the
information for B1, C1, and D1 and then fills down from there which
makes sense based on the formula, but this is not what I need it to
do.

If A1 is not the first empty cell what is the formula or VBA code to
use so Excel sees the cell and combines the corresponding cells from
B, C, and D?

I am sure I will feel like an idiot when I see it but for some reason
the solution is escaping me right now (too many late nights I am
sure). I have looked at row(), column(), address() and tried some
combining and such to get the results I want. It has not worked.

Thanks for everything.

Dow.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Corresponding Row Question.

OOPS,

I had an elderly moment, try this instead

Sub Sistence()
For counter = 2 To 20
If Range("D" & counter) = "" Then
Range("D" & counter).Formula = _
"=A" & counter & "&B" & counter & "&c" & counter
End If
Next
End Sub

Mike

"Mike H" wrote:

Hi,

Try this

Sub Sistence()
For counter = 2 To 20
If Range("D" & counter) = "" Then
Range("D" & counter).Formula = "=A1&B1&c1"
End If
Next
End Sub

Mike

"Dow" wrote:

I am having trouble finding what I am looking for. Hopefully someone
out there can assist. I suspect it is easier than I am making it.

My goal is to find the blank cells in a column and concatenate three
corresponding cells. The trouble I am having is making sure the
formula I use corresponds to the correct row.

I have written a macro to select the empty cells in Column A. I then
want to insert a formula similar to "=B1&C1&D1" but I need the row
number to corrospond to the row number of the Cell in column A.

If A1 is blank this formula works perfectly, it fills in the blanks
and it changes to B2, C2, D2, etc as needed. A1 will not always be
blank though. If A3 is the first blank cell it fills in the
information for B1, C1, and D1 and then fills down from there which
makes sense based on the formula, but this is not what I need it to
do.

If A1 is not the first empty cell what is the formula or VBA code to
use so Excel sees the cell and combines the corresponding cells from
B, C, and D?

I am sure I will feel like an idiot when I see it but for some reason
the solution is escaping me right now (too many late nights I am
sure). I have looked at row(), column(), address() and tried some
combining and such to get the results I want. It has not worked.

Thanks for everything.

Dow.

  #4   Report Post  
Posted to microsoft.public.excel.programming
Dow Dow is offline
external usenet poster
 
Posts: 31
Default Corresponding Row Question.

On Jul 31, 9:24*am, Mike H wrote:
OOPS,

I had an elderly moment, try this instead

Sub Sistence()
For counter = 2 To 20
* * If Range("D" & counter) = "" Then
* * * Range("D" & counter).Formula = _
* * * "=A" & counter & "&B" & counter & "&c" & counter
* * End If
Next
End Sub

Mike



"Mike H" wrote:
Hi,


Try this


Sub Sistence()
For counter = 2 To 20
* * If Range("D" & counter) = "" Then
* * * Range("D" & counter).Formula = "=A1&B1&c1"
* * End If
Next
End Sub


Mike


"Dow" wrote:


I am having trouble finding what I am looking for. *Hopefully someone
out there can assist. *I suspect it is easier than I am making it.


My goal is to find the blank cells in a column and concatenate three
corresponding cells. *The trouble I am having is making sure the
formula I use corresponds to the correct row.


I have written a macro to select the empty cells in Column A. *I then
want to insert a formula similar to "=B1&C1&D1" but I need the row
number to corrospond to the row number of the Cell in column A.


If A1 is blank this formula works perfectly, it fills in the blanks
and it changes to B2, C2, D2, etc as needed. A1 will not always be
blank though. *If A3 is the first blank cell it *fills in the
information for B1, C1, and D1 and then fills down from there which
makes sense based on the formula, but this is not what I need it to
do.


If A1 is not the first empty cell what is the formula or VBA code to
use so Excel sees the cell and combines the corresponding cells from
B, C, and D?


I am sure I will feel like an idiot when I see it but for some reason
the solution is escaping me right now (too many late nights I am
sure). *I have looked at row(), column(), address() and tried some
combining and such to get the results I want. *It has not worked.


Thanks for everything.


Dow.- Hide quoted text -


- Show quoted text -


Did not quite work but I think I can modify it. For my own
information is there a formula that can be written (non VBA) that
would help Excel see the location of the cell and use the correct row
number?
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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good davegb Excel Programming 1 May 6th 05 06:35 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 27th 05 07:46 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 23 April 23rd 05 09:26 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 22nd 05 03:30 PM


All times are GMT +1. The time now is 12:32 AM.

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

About Us

"It's about Microsoft Excel"