Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selcting data from a list

Thank you in advance for any assistance! I truly value any advic
given!
I have 3 columns. Column 1 displays contrac ID for about 10 contracts
Column 2 is either blank or has the word "Flow" depending on th
lifetime of the contract in relation to the current date. Column 3 i
blank.
Would it be possible to loop through a selected range in column 2 an
if the word "Flow" appears, then take the contract ID in column 1 an
transfer it to column 3 -- one after the other so that the blanks i
column 2 are eliminated?
So far, I have only been able to come up with this code:
Sub CURRENT_CONTRACT()
Set rng = Range("G4:G13")
Sheets("CONTRACTS").Select

For Each Cell In rng
If Cell.Value = "Flow" Then

Unfortunately, I don't have the knowledge to advance in a clear manne
from here. Sorry. Thanks again for any assistance

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Selcting data from a list

"Oakman",

I've made some assupmtions based on the ranges you used
and I just made this code up rather than actually test it,
but it should work:

Sub FindFlow()

option compare text

Dim rng as Range
Dim cl as Range

Sheets("Contracts").select

Set rng = Range("G4:G13")

For each cl in rng.cells
If cl.value = "Flow" Then
cl.Offset(1,0).value = cl.offset(-1,0).value
End If
Next cl

Set rng = nothing

End Sub

'Cheers, Pete.

-----Original Message-----
Thank you in advance for any assistance! I truly value

any advice
given!
I have 3 columns. Column 1 displays contrac ID for about

10 contracts.
Column 2 is either blank or has the word "Flow" depending

on the
lifetime of the contract in relation to the current

date. Column 3 is
blank.
Would it be possible to loop through a selected range in

column 2 and
if the word "Flow" appears, then take the contract ID in

column 1 and
transfer it to column 3 -- one after the other so that

the blanks in
column 2 are eliminated?
So far, I have only been able to come up with this code:
Sub CURRENT_CONTRACT()
Set rng = Range("G4:G13")
Sheets("CONTRACTS").Select

For Each Cell In rng
If Cell.Value = "Flow" Then

Unfortunately, I don't have the knowledge to advance in a

clear manner
from here. Sorry. Thanks again for any assistance!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selcting data from a list

Thank you Pete,

I have not had the time to apply the code, but I am grateful for you
time

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

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
Selcting data from table without repeating plus calc's QChris Excel Worksheet Functions 2 November 30th 09 01:56 PM
data validation list: how do i 'force' a user to enter data from the list? showsomeidnow Excel Discussion (Misc queries) 4 May 1st 07 05:49 PM
data validation list: how do i 'force' a user to enter data from the list? showsomeidnow Excel Discussion (Misc queries) 2 April 29th 07 11:09 PM
How to view a list of data based on another list of data Adnan Excel Discussion (Misc queries) 3 April 10th 07 05:22 PM
converting vertical data list to horizontal data list tjb Excel Worksheet Functions 2 July 15th 06 02:17 AM


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