Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Check the two different cells in the same row

Hi all,

Could anyone tell me how to check all cells of the same column by the
following conditions:

1) if the cell (D5) is blank and the cell (A5) is not blank, then fill data
into D5

2) if the cell (D5) is blank and the cell (A5) is blank, then no need to
fill anything


Thanks for in advance.

Tlee

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Check the two different cells in the same row

It is simplier just to move a into d if a is blank or if a is not blank.

sub CheckColumns

RowCount = 1
Do while Range("A" & RowCount) < ""
if Range("D" & RowCount) = "" then
Range("D" & RowCount) = Range("A" & RowCount)
end if

RowCount = RowCount + 1
loop

end sub

"tlee" wrote:

Hi all,

Could anyone tell me how to check all cells of the same column by the
following conditions:

1) if the cell (D5) is blank and the cell (A5) is not blank, then fill data
into D5

2) if the cell (D5) is blank and the cell (A5) is blank, then no need to
fill anything


Thanks for in advance.

Tlee


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Check the two different cells in the same row

Hi Joel,

Many thanks for your help!!!

Tlee


It is simplier just to move a into d if a is blank or if a is not blank.

sub CheckColumns

RowCount = 1
Do while Range("A" & RowCount) < ""
if Range("D" & RowCount) = "" then
Range("D" & RowCount) = Range("A" & RowCount)
end if

RowCount = RowCount + 1
loop

end sub

"tlee" wrote:

Hi all,

Could anyone tell me how to check all cells of the same column by the
following conditions:

1) if the cell (D5) is blank and the cell (A5) is not blank, then fill
data
into D5

2) if the cell (D5) is blank and the cell (A5) is blank, then no need to
fill anything


Thanks for in advance.

Tlee


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Check the two different cells in the same row

Hi Joel,

Many thanks for your help!!!

Tlee


It is simplier just to move a into d if a is blank or if a is not blank.

sub CheckColumns

RowCount = 1
Do while Range("A" & RowCount) < ""
if Range("D" & RowCount) = "" then
Range("D" & RowCount) = Range("A" & RowCount)
end if

RowCount = RowCount + 1
loop

end sub

"tlee" wrote:

Hi all,

Could anyone tell me how to check all cells of the same column by the
following conditions:

1) if the cell (D5) is blank and the cell (A5) is not blank, then fill
data
into D5

2) if the cell (D5) is blank and the cell (A5) is blank, then no need to
fill anything


Thanks for in advance.

Tlee


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
Check 3 cells, only one of the cells my be filled Peter Jonkers Excel Worksheet Functions 7 July 13th 09 01:39 PM
Check 1 cells value and use the result to change another cells for BigAl Excel Programming 3 December 25th 08 09:48 PM
check value into cells Maileen Excel Discussion (Misc queries) 2 December 7th 04 04:45 PM
Check cells in a column Stuart[_5_] Excel Programming 2 August 30th 04 09:28 AM
Check Cells are EXACTLY the Same Chris Adams Excel Programming 2 May 24th 04 03:17 PM


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