Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
leo
 
Posts: n/a
Default how to populate a 3rd column with with data from 1st or 2nd colum

I have 3 columns of numbers:A,B,C. I want to populate column C with the
number in column A only if there is no number in column B

example
A B C
1 blank 1
2 3 3
  #2   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default how to populate a 3rd column with with data from 1st or 2nd colum

Hi

Try this in column C:
=IF(B2="",A2,"")
What do you want in C if B contains a number? If it is B, try this one:
=IF(B2="",A2,B2)

Hope this helps.
Andy.

"leo" wrote in message
...
I have 3 columns of numbers:A,B,C. I want to populate column C with the
number in column A only if there is no number in column B

example
A B C
1 blank 1
2 3 3



  #3   Report Post  
Posted to microsoft.public.excel.misc
grahammal
 
Posts: n/a
Default how to populate a 3rd column with with data from 1st or 2nd colum


Sub Button1_Click()
10 For a = 1 To 1000
20 If Sheets("Sheet1").Range("A" & a) = "" Then r = a - 1: GoTo 40 Else
GoTo 30 ' Looks for end of list
30 Next a
40 For b = 1 To r
50 If Sheets("Sheet1").Range("B" & b) = "" Then
Sheets("Sheet1").Range("C" & b) = Sheets("Sheet1").Range("A" & b)
60 Next b
End Sub


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=508073

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 Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
From several workbooks onto one excel worksheet steve Excel Discussion (Misc queries) 6 December 1st 05 08:03 AM
Loading Column Data with blank Rows into Data Validation Box ExcelMonkey Excel Worksheet Functions 3 October 13th 05 06:09 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Can you average data in 1 column based on a range of values in another? kman24 Excel Worksheet Functions 2 November 17th 04 02:09 PM


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