Macros to copy conditional data

[Closed]
Report
-
Posts
2809
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 23, 2021
-
Hello,

I am beginner in macros and am trying a macro code which does the following.
I have 2 sheets by name sheet1 and sheet2, sheet1 consists of raw data and sheet2 consists of only the column headings.
like:

sheet1:

column1
a
b
d
e
c
f
h

column2
i
j
k
l
m
o
p



column3
NA
q
NA
NA
t
r
s
NA


cloumn4
NA
t
u
v
NA
NA
NA
w

sheet2:

column1


column2


column3


column4



I want a macro code that checks column3 and column4 for inf apart from NA and should reflect the data in sheet2 as

Column1
b
c
d
e
f
g
h

Column2
j
k
l
m
n
o
p

column3
q
-
-
t
r
s
-


column4
u
t
v
-
-
-
w


Thank You,
Solo
<cniWkYufrindows 7 / Internet Explorer 9.0</config>

1 reply

Posts
2809
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 23, 2021
484
Hi Solo,

What do you mean by checking 2 columns for "inf"?

It looks to me that you did 3 things.
1. Remove the first row.
2. Replace "NA" with "-".
3. Some kind of Autofill - Alphabetise combi.

Could you clarify your query?

Best regards,
Trowa