ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   merge two rows (https://www.excelbanter.com/excel-discussion-misc-queries/228008-merge-two-rows.html)

CandiC

merge two rows
 
I have information in columns A and B however the price is indicated in
Column A for some rows and Column B for some and in both for others. I am
interested in keeping the actual cost when available, however, when the ACT
CST is blank I would like to populate it with the STD CST stated. I would
like to merge the two colums into one As follows:

Col A ........Col B ...........Col C............Col D
Part No......STD CST......ACT CST.......Merged
152C............2.00............Blank............2 .00
153A............Blank..........7.50..............7 .50
165A............9.56...........Blank.............9 .56
175V............12.20.........12.35............12. 35
187A............Blank..........5.23.............5. 23
185A............1.25...........4.21.............4. 21

Is there a formula that can do this or would this require a macro?


PSULionRP

merge two rows
 
Why don't you write an "IF" statement in the D Cells to take care of this.

Something like this...

=IF(B2<"",D2=B2,D2=C2)

"CandiC" wrote:

I have information in columns A and B however the price is indicated in
Column A for some rows and Column B for some and in both for others. I am
interested in keeping the actual cost when available, however, when the ACT
CST is blank I would like to populate it with the STD CST stated. I would
like to merge the two colums into one As follows:

Col A ........Col B ...........Col C............Col D
Part No......STD CST......ACT CST.......Merged
152C............2.00............Blank............2 .00
153A............Blank..........7.50..............7 .50
165A............9.56...........Blank.............9 .56
175V............12.20.........12.35............12. 35
187A............Blank..........5.23.............5. 23
185A............1.25...........4.21.............4. 21

Is there a formula that can do this or would this require a macro?


PSULionRP

merge two rows
 
Actually...my bad...

=IF(C2<"",D2=C2,D2=B2)

I hope you get the idea. A couple of assumptions here...the columns are
formatted in such a way that <blank is valid and they are NOT 0. And also
assuming that at least one of your columns, STD CST or ACT CST, will have a
value. Will they or could they ever both be <blank...

"CandiC" wrote:

I have information in columns A and B however the price is indicated in
Column A for some rows and Column B for some and in both for others. I am
interested in keeping the actual cost when available, however, when the ACT
CST is blank I would like to populate it with the STD CST stated. I would
like to merge the two colums into one As follows:

Col A ........Col B ...........Col C............Col D
Part No......STD CST......ACT CST.......Merged
152C............2.00............Blank............2 .00
153A............Blank..........7.50..............7 .50
165A............9.56...........Blank.............9 .56
175V............12.20.........12.35............12. 35
187A............Blank..........5.23.............5. 23
185A............1.25...........4.21.............4. 21

Is there a formula that can do this or would this require a macro?


CandiC

merge two rows
 
You are correct in stating that the value in columns, A, B or C will always
be <blank and never be zero, However the values are dynamic meaning that
Col. B could be ,<,or = to column C and visa versa.
The following formula is only returning a (-) dash mark as an answer. So it
doesn't seem to work, any other ideas?

"PSULionRP" wrote:

Actually...my bad...

=IF(C2<"",D2=C2,D2=B2)

I hope you get the idea. A couple of assumptions here...the columns are
formatted in such a way that <blank is valid and they are NOT 0. And also
assuming that at least one of your columns, STD CST or ACT CST, will have a
value. Will they or could they ever both be <blank...

"CandiC" wrote:

I have information in columns A and B however the price is indicated in
Column A for some rows and Column B for some and in both for others. I am
interested in keeping the actual cost when available, however, when the ACT
CST is blank I would like to populate it with the STD CST stated. I would
like to merge the two colums into one As follows:

Col A ........Col B ...........Col C............Col D
Part No......STD CST......ACT CST.......Merged
152C............2.00............Blank............2 .00
153A............Blank..........7.50..............7 .50
165A............9.56...........Blank.............9 .56
175V............12.20.........12.35............12. 35
187A............Blank..........5.23.............5. 23
185A............1.25...........4.21.............4. 21

Is there a formula that can do this or would this require a macro?


PSULionRP

merge two rows
 
Try this...

=IF(C2<"",C2,B2)

"CandiC" wrote:

You are correct in stating that the value in columns, A, B or C will always
be <blank and never be zero, However the values are dynamic meaning that
Col. B could be ,<,or = to column C and visa versa.
The following formula is only returning a (-) dash mark as an answer. So it
doesn't seem to work, any other ideas?

"PSULionRP" wrote:

Actually...my bad...

=IF(C2<"",D2=C2,D2=B2)

I hope you get the idea. A couple of assumptions here...the columns are
formatted in such a way that <blank is valid and they are NOT 0. And also
assuming that at least one of your columns, STD CST or ACT CST, will have a
value. Will they or could they ever both be <blank...

"CandiC" wrote:

I have information in columns A and B however the price is indicated in
Column A for some rows and Column B for some and in both for others. I am
interested in keeping the actual cost when available, however, when the ACT
CST is blank I would like to populate it with the STD CST stated. I would
like to merge the two colums into one As follows:

Col A ........Col B ...........Col C............Col D
Part No......STD CST......ACT CST.......Merged
152C............2.00............Blank............2 .00
153A............Blank..........7.50..............7 .50
165A............9.56...........Blank.............9 .56
175V............12.20.........12.35............12. 35
187A............Blank..........5.23.............5. 23
185A............1.25...........4.21.............4. 21

Is there a formula that can do this or would this require a macro?


PSULionRP

merge two rows
 
Was I able to help Candi???

"CandiC" wrote:

You are correct in stating that the value in columns, A, B or C will always
be <blank and never be zero, However the values are dynamic meaning that
Col. B could be ,<,or = to column C and visa versa.
The following formula is only returning a (-) dash mark as an answer. So it
doesn't seem to work, any other ideas?

"PSULionRP" wrote:

Actually...my bad...

=IF(C2<"",D2=C2,D2=B2)

I hope you get the idea. A couple of assumptions here...the columns are
formatted in such a way that <blank is valid and they are NOT 0. And also
assuming that at least one of your columns, STD CST or ACT CST, will have a
value. Will they or could they ever both be <blank...

"CandiC" wrote:

I have information in columns A and B however the price is indicated in
Column A for some rows and Column B for some and in both for others. I am
interested in keeping the actual cost when available, however, when the ACT
CST is blank I would like to populate it with the STD CST stated. I would
like to merge the two colums into one As follows:

Col A ........Col B ...........Col C............Col D
Part No......STD CST......ACT CST.......Merged
152C............2.00............Blank............2 .00
153A............Blank..........7.50..............7 .50
165A............9.56...........Blank.............9 .56
175V............12.20.........12.35............12. 35
187A............Blank..........5.23.............5. 23
185A............1.25...........4.21.............4. 21

Is there a formula that can do this or would this require a macro?



All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com