Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 131
Default Copy corresponding cell if value is 0

Hi,

How can I copy corresponding cell if value in Col E 0..? Something like
below.

Col D |Col E
ABC |12
MNO |2
HTR |0
UTV |0
HNC |5
XYZ |6
QTR |2
GTR |0
MTR |8


Result:

Col D |Col E
ABC |12
MNO |2
HNC |5
XYZ |6
QTR |2
MTR |8

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Copy corresponding cell if value is 0

Hi,

You could apply an AutoFilter and filter on not equal to 0, then copy the
results to a new location
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Kashyap" wrote:

Hi,

How can I copy corresponding cell if value in Col E 0..? Something like
below.

Col D |Col E
ABC |12
MNO |2
HTR |0
UTV |0
HNC |5
XYZ |6
QTR |2
GTR |0
MTR |8


Result:

Col D |Col E
ABC |12
MNO |2
HNC |5
XYZ |6
QTR |2
MTR |8

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 131
Default Copy corresponding cell if value is 0


Hi Shane,

I cannot use auto filter there as the whole report is automated.

Can you suggest me any other way of doing this?

Thanks



"Shane Devenshire" wrote:

Hi,

You could apply an AutoFilter and filter on not equal to 0, then copy the
results to a new location
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Kashyap" wrote:

Hi,

How can I copy corresponding cell if value in Col E 0..? Something like
below.

Col D |Col E
ABC |12
MNO |2
HTR |0
UTV |0
HNC |5
XYZ |6
QTR |2
GTR |0
MTR |8


Result:

Col D |Col E
ABC |12
MNO |2
HNC |5
XYZ |6
QTR |2
MTR |8

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Copy corresponding cell if value is 0

What does an automated report have to do with it? If autofilter affects the
report, simply turn it off after you have done the copy.

Regards,
Fred.

"Kashyap" wrote in message
...

Hi Shane,

I cannot use auto filter there as the whole report is automated.

Can you suggest me any other way of doing this?

Thanks



"Shane Devenshire" wrote:

Hi,

You could apply an AutoFilter and filter on not equal to 0, then copy the
results to a new location
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Kashyap" wrote:

Hi,

How can I copy corresponding cell if value in Col E 0..? Something
like
below.

Col D |Col E
ABC |12
MNO |2
HTR |0
UTV |0
HNC |5
XYZ |6
QTR |2
GTR |0
MTR |8


Result:

Col D |Col E
ABC |12
MNO |2
HNC |5
XYZ |6
QTR |2
MTR |8


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Copy corresponding cell if value is 0

1.Right click on toolbarselect control box
2.from the control box that appears on the sheet1, select and draw a command
button on your sheet
3.Double click the command button to open the code window and paste following
codes
#
Private Sub CommandButton1_Click()
Dim row As Integer, col As Integer
row = 1
col = 5

Dim rowinsheet2 As Integer, colinsheet2 As Integer
rowinsheet2 = 1
colinsheet2 = 5
While Sheet1.Cells(row, col).Value < ""
If CInt(Sheet1.Cells(row, col).Value) 0 Then
Sheet2.Cells(rowinsheet2, colinsheet2).Value = Sheet1.Cells(row,
col).Value
Sheet2.Cells(rowinsheet2, colinsheet2 - 1).Value = Sheet1.Cells
(row, col - 1).Value
rowinsheet2 = rowinsheet2 + 1
End If
row = row + 1
Wend
End Sub
#

Note that it will move data from sheet1 to sheet2


Hope this works


Have a nice time

Chris
------
Convert your Excel spreadsheet into an online calculator.
http://www.spreadsheetconverter.com

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200902/1

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 worksheet1 to worksheet2, keep cell format eg cell size slocookie Excel Discussion (Misc queries) 2 January 8th 10 11:24 AM
copy selected part number of text from one cell into another cell orewa Excel Discussion (Misc queries) 1 April 11th 08 01:30 PM
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
I copy a formula and the results copy from the original cell brooklynsd Excel Discussion (Misc queries) 1 June 23rd 07 01:35 AM
Copy data in one cell to blank cell immediately below, repeat Jeff Excel Worksheet Functions 1 May 19th 06 07:12 PM


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