Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy data in column based on cell value


Greetins to all,
I would like to THANK all in advance for your generous help. This is
my question. I have a file with two spreadsheets - INPUT and
INCS&DECS. On row 4 of "INCS&DECS", i have an IF statement to show the
word "Total" when appropriate. I would like to copy data for rows 6 to
30 from the "INCS&DECS" spreadsheet to a specified area in the "INPUT"
sheet whenever the word "Total" appears in row 4 in the "INCS&DECS"
sheet. I am still an absolute beginner, although I have tried in the
past - slow learner. Therefore, I am ashamed to say that I don't even
have a piece of code to show for because I don't even know where to
begin.

I would be greatful for any help with this problem. Thanks again!


--
oakman
------------------------------------------------------------------------
oakman's Profile: http://www.excelforum.com/member.php...fo&userid=9172
View this thread: http://www.excelforum.com/showthread...hreadid=272818

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy data in column based on cell value

Data appears in cells - not rows or do you mean any cell in row 4 may
contain the word total. If so, then do you mean you only want to copy data
from that column for rows 6 to 30.

What makes total appear. Is this due to a formula, so the calculate event
would need to be used as a trigger. Or does someone hand enter the word
total.

If the whole of rows 6 to 300 are not copied, but only a single column, if
total appeared in a new column in row 4, would the new column's data
overwrite the original data from old column that contained total?

worksheets("INCS&DECS").rows("6:30").copy _
Destination:=worksheets("Input").Range("A50")

would copy the whole of rows 6 through 30.


--
Regards,
Tom Ogilvy
"oakman" wrote in message
...

Greetins to all,
I would like to THANK all in advance for your generous help. This is
my question. I have a file with two spreadsheets - INPUT and
INCS&DECS. On row 4 of "INCS&DECS", i have an IF statement to show the
word "Total" when appropriate. I would like to copy data for rows 6 to
30 from the "INCS&DECS" spreadsheet to a specified area in the "INPUT"
sheet whenever the word "Total" appears in row 4 in the "INCS&DECS"
sheet. I am still an absolute beginner, although I have tried in the
past - slow learner. Therefore, I am ashamed to say that I don't even
have a piece of code to show for because I don't even know where to
begin.

I would be greatful for any help with this problem. Thanks again!


--
oakman
------------------------------------------------------------------------
oakman's Profile:

http://www.excelforum.com/member.php...fo&userid=9172
View this thread: http://www.excelforum.com/showthread...hreadid=272818



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Copy data in column based on cell value

''select the sheet where total appears
sheets("INCS&DECS").select
If range("A4").value="Total" then
rows(6:30).copy
' select the sheet you want to copy from
sheets("INPUT").select
'select destination and paste
INPUT.Range("A5").Select
activecell.pastespecial


-----Original Message-----

Greetins to all,
I would like to THANK all in advance for your generous

help. This is
my question. I have a file with two spreadsheets - INPUT

and
INCS&DECS. On row 4 of "INCS&DECS", i have an IF

statement to show the
word "Total" when appropriate. I would like to copy data

for rows 6 to
30 from the "INCS&DECS" spreadsheet to a specified area

in the "INPUT"
sheet whenever the word "Total" appears in row 4 in

the "INCS&DECS"
sheet. I am still an absolute beginner, although I have

tried in the
past - slow learner. Therefore, I am ashamed to say that

I don't even
have a piece of code to show for because I don't even

know where to
begin.

I would be greatful for any help with this problem.

Thanks again!


--
oakman
----------------------------------------------------------

--------------
oakman's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=9172
View this thread:

http://www.excelforum.com/showthread...hreadid=272818

.

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
Copy last cell with data in column E on one sheet to cell on anoth Seahawk Excel Worksheet Functions 7 May 7th 09 02:52 AM
Copy data from other worksheet based on column header [email protected] Excel Discussion (Misc queries) 0 April 29th 08 08:18 PM
lookup column label based on data in cell Aaron Excel Worksheet Functions 1 August 22nd 06 04:13 PM
How to copy data to the next empty cell in a column suruukko Excel Worksheet Functions 2 July 22nd 06 12:35 PM
Macro to copy cell data to word document based on an active row? Brian Excel Programming 2 September 16th 04 01:55 PM


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